mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 11:17:53 +00:00
Adding security contexts to the resources. (#3840)
This commit is contained in:
parent
0c0b02eb3d
commit
1ceac8407d
@ -2,7 +2,7 @@ swagger: '2.0'
|
|||||||
info:
|
info:
|
||||||
title: Home Assistant
|
title: Home Assistant
|
||||||
description: Home Assistant REST API
|
description: Home Assistant REST API
|
||||||
version: "1.0.0"
|
version: "1.0.1"
|
||||||
# the domain of the service
|
# the domain of the service
|
||||||
host: localhost:8123
|
host: localhost:8123
|
||||||
|
|
||||||
@ -12,17 +12,17 @@ schemes:
|
|||||||
- https
|
- https
|
||||||
|
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
api_key:
|
|
||||||
type: apiKey
|
|
||||||
description: API password
|
|
||||||
name: api_password
|
|
||||||
in: query
|
|
||||||
|
|
||||||
#api_key:
|
#api_key:
|
||||||
# type: apiKey
|
# type: apiKey
|
||||||
# description: API password
|
# description: API password
|
||||||
# name: x-ha-access
|
# name: api_password
|
||||||
# in: header
|
# in: query
|
||||||
|
|
||||||
|
api_key:
|
||||||
|
type: apiKey
|
||||||
|
description: API password
|
||||||
|
name: x-ha-access
|
||||||
|
in: header
|
||||||
|
|
||||||
# will be prefixed to all paths
|
# will be prefixed to all paths
|
||||||
basePath: /api
|
basePath: /api
|
||||||
@ -38,6 +38,8 @@ paths:
|
|||||||
description: Returns message if API is up and running.
|
description: Returns message if API is up and running.
|
||||||
tags:
|
tags:
|
||||||
- Core
|
- Core
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: API is up and running
|
description: API is up and running
|
||||||
@ -53,6 +55,8 @@ paths:
|
|||||||
description: Returns the current configuration as JSON.
|
description: Returns the current configuration as JSON.
|
||||||
tags:
|
tags:
|
||||||
- Core
|
- Core
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Current configuration
|
description: Current configuration
|
||||||
@ -81,6 +85,8 @@ paths:
|
|||||||
summary: Returns all data needed to bootstrap Home Assistant.
|
summary: Returns all data needed to bootstrap Home Assistant.
|
||||||
tags:
|
tags:
|
||||||
- Core
|
- Core
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Bootstrap information
|
description: Bootstrap information
|
||||||
@ -96,6 +102,8 @@ paths:
|
|||||||
description: Returns an array of event objects. Each event object contain event name and listener count.
|
description: Returns an array of event objects. Each event object contain event name and listener count.
|
||||||
tags:
|
tags:
|
||||||
- Events
|
- Events
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Events
|
description: Events
|
||||||
@ -113,6 +121,8 @@ paths:
|
|||||||
description: Returns an array of service objects. Each object contains the domain and which services it contains.
|
description: Returns an array of service objects. Each object contains the domain and which services it contains.
|
||||||
tags:
|
tags:
|
||||||
- Services
|
- Services
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Services
|
description: Services
|
||||||
@ -130,6 +140,8 @@ paths:
|
|||||||
description: Returns an array of state changes in the past. Each object contains further detail for the entities.
|
description: Returns an array of state changes in the past. Each object contains further detail for the entities.
|
||||||
tags:
|
tags:
|
||||||
- State
|
- State
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: State changes
|
description: State changes
|
||||||
@ -148,6 +160,8 @@ paths:
|
|||||||
Returns an array of state objects. Each state has the following attributes: entity_id, state, last_changed and attributes.
|
Returns an array of state objects. Each state has the following attributes: entity_id, state, last_changed and attributes.
|
||||||
tags:
|
tags:
|
||||||
- State
|
- State
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: States
|
description: States
|
||||||
@ -166,6 +180,8 @@ paths:
|
|||||||
Returns a state object for specified entity_id.
|
Returns a state object for specified entity_id.
|
||||||
tags:
|
tags:
|
||||||
- State
|
- State
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
parameters:
|
parameters:
|
||||||
- name: entity_id
|
- name: entity_id
|
||||||
in: path
|
in: path
|
||||||
@ -223,6 +239,8 @@ paths:
|
|||||||
Retrieve all errors logged during the current session of Home Assistant as a plaintext response.
|
Retrieve all errors logged during the current session of Home Assistant as a plaintext response.
|
||||||
tags:
|
tags:
|
||||||
- Core
|
- Core
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
produces:
|
produces:
|
||||||
- text/plain
|
- text/plain
|
||||||
responses:
|
responses:
|
||||||
@ -239,6 +257,8 @@ paths:
|
|||||||
Returns the data (image) from the specified camera entity_id.
|
Returns the data (image) from the specified camera entity_id.
|
||||||
tags:
|
tags:
|
||||||
- Camera
|
- Camera
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
produces:
|
produces:
|
||||||
- image/jpeg
|
- image/jpeg
|
||||||
parameters:
|
parameters:
|
||||||
@ -262,6 +282,8 @@ paths:
|
|||||||
Fires an event with event_type
|
Fires an event with event_type
|
||||||
tags:
|
tags:
|
||||||
- Events
|
- Events
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
@ -286,6 +308,8 @@ paths:
|
|||||||
Calls a service within a specific domain. Will return when the service has been executed or 10 seconds has past, whichever comes first.
|
Calls a service within a specific domain. Will return when the service has been executed or 10 seconds has past, whichever comes first.
|
||||||
tags:
|
tags:
|
||||||
- Services
|
- Services
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
@ -317,6 +341,8 @@ paths:
|
|||||||
Render a Home Assistant template.
|
Render a Home Assistant template.
|
||||||
tags:
|
tags:
|
||||||
- Template
|
- Template
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
produces:
|
produces:
|
||||||
@ -338,6 +364,8 @@ paths:
|
|||||||
Setup event forwarding to another Home Assistant instance.
|
Setup event forwarding to another Home Assistant instance.
|
||||||
tags:
|
tags:
|
||||||
- Core
|
- Core
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
@ -376,6 +404,8 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Core
|
- Core
|
||||||
- Events
|
- Events
|
||||||
|
security:
|
||||||
|
- api_key: []
|
||||||
produces:
|
produces:
|
||||||
- text/event-stream
|
- text/event-stream
|
||||||
parameters:
|
parameters:
|
||||||
@ -420,8 +450,16 @@ definitions:
|
|||||||
location_name:
|
location_name:
|
||||||
type: string
|
type: string
|
||||||
unit_system:
|
unit_system:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
length:
|
||||||
|
type: string
|
||||||
|
mass:
|
||||||
|
type: string
|
||||||
|
temperature:
|
||||||
|
type: string
|
||||||
|
volume:
|
||||||
type: string
|
type: string
|
||||||
description: The system for measurement units
|
|
||||||
time_zone:
|
time_zone:
|
||||||
type: string
|
type: string
|
||||||
version:
|
version:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user