Declare its devices
const url = 'https://api.blupinta.app/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/devices';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"devices":[{"id":"example","name":"example","kind":"light","room":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.blupinta.app/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/devices \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "devices": [ { "id": "example", "name": "example", "kind": "light", "room": "example" } ] }'Replaces the devices the app knows for this project (its lights, covers, switches, sensors, climate and media, by its own ids), offered in the editor when binding a light or a shutter of the home.
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
Request Bodyrequired
Section titled “Request Bodyrequired”The devices an app declares for a project, replaced whole each time
object
A device an app knows, for the editor’s binding pickers
object
The app’s own name for it: a Home Assistant entity_id (light.soggiorno)
As people read it
cover: shutters, curtains, awnings
The room it is in, as the app calls it; null when it doesn’t say
Responses
Section titled “ Responses ”Declare its devices
The devices an app declares for a project, replaced whole each time
object
A device an app knows, for the editor’s binding pickers
object
The app’s own name for it: a Home Assistant entity_id (light.soggiorno)
As people read it
cover: shutters, curtains, awnings
The room it is in, as the app calls it; null when it doesn’t say
Example
{ "devices": [ { "kind": "light" } ]}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
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