Save a version
const url = 'https://api.blupinta.app/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/revisions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"home":"example","message":"example","baseRevision":1,"thumbnail":"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/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/revisions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "home": "example", "message": "example", "baseRevision": 1, "thumbnail": "example" }'Saves a home as the project’s next version, held to everything Save version is held to in the editor (the format, the checks, the files it names, what connected apps need). It starts from baseRevision: another version saved since is a conflict, nothing overwritten. The draft the editor works on is left as it is; the editors open on the project learn of the new version, which says the app saved it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”One of the projects the person chose when connecting the app
Header Parameters
Section titled “Header Parameters”Any unique text of the app’s, the same for a retry: the request is acted on once, its answer kept a day
Request Bodyrequired
Section titled “Request Bodyrequired”A version to save: a home, a line saying what changed, and the version it starts from
object
The home, in any version of the format: brought to the current one as an import is
What changed, as people read it in the project’s history
A picture of the home, WebP as base64, at most 256 kB; the version keeps none without it
Examplegenerated
{ "home": "example", "message": "example", "baseRevision": 1, "thumbnail": "example"}Responses
Section titled “ Responses ”Save a version
A saved version of a project’s home, without the home itself
object
The version’s number, from 1, never reused
What its author wrote when saving it
Who saved it: their name, or their address when they gave none; null once their account is gone
When it was saved, ISO 8601
Examplegenerated
{ "number": 1, "message": "example", "authorName": "example", "restoredFrom": 1, "createdAt": "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
not_found: Nothing there, or nothing this token may read
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
conflict: Another version was saved since the one the request starts from: problems names the last
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
invalid_home: The home isn’t one of the format, or names files the project lacks: problems says what; blocking_problems: The home can’t be saved as a version: problems lists why (as POST /v1/homes/check does)
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