Skip to content

Add a Kodi instance

POST
/api/v1/kodi/instances
curl --request POST \
--url https://example.com/api/v1/kodi/instances \
--header 'Content-Type: application/json' \
--cookie encore_session=<encore_session> \
--data '{ "broadcast": "example", "language": "example", "mac": "example", "name": "example", "password": "example", "shutdown": "inherit", "timezone": "example", "url": "example", "username": "example", "websocket_url": "example" }'
Media typeapplication/json
object
broadcast
string
language

Title-matching rules, e.g. en or de

string
mac
string
name
string
>= 1 characters <= 64 characters
password

Write-only; empty removes it

string
shutdown
string
Allowed values: inherit quit power_off
timezone

The Kodi host’s IANA time zone; empty learns it from Kodi’s clock

string
url

HTTP JSON-RPC endpoint, e.g. http://192.168.1.20:8080/jsonrpc

string
username
string
websocket_url

E.g. ws://192.168.1.20:9090/jsonrpc; empty disables live updates

string

Created

Media typeapplication/json
object
broadcast
required
string
default_for_unlinked
required
boolean
has_password
required
boolean
id
required
integer format: int64
language
required

Title-matching rules for this library

string
library
required
object
episodes
required
integer format: int64
group_id
required
integer format: int64
is_source
required
boolean
movies
required
integer format: int64
newest_title
required
One of:
object
findable
required
boolean
title
required
string
year
required
integer format: int64
shared
required
boolean
shows
required
integer format: int64
songs
required
integer format: int64
mac
required
string
managed_by_config
required
boolean
name
required
string
now_playing
required
One of:
object
art_url
required

The item’s poster or thumbnail, fetched from Kodi through encore; empty when Kodi has none

string
duration_s
required
integer format: int64
episode
required
integer format: int64
kind
required
string
paused
required
boolean
position_s
required
integer format: int64
season
required
integer format: int64
show
required
string
title
required
string
shutdown
required

What “shut down” does; inherit follows Settings › Features

string
Allowed values: inherit quit power_off
status
required
object
api_version
required
string
kodi_version
required
string
last_event_at
required
string | null format: date-time
last_sync_at
required
string | null format: date-time
next_sync_at
required
string | null format: date-time
state
required
string
Allowed values: connected http_only asleep offline
timezone
required

The Kodi host’s IANA time zone; empty when learnt from Kodi’s clock

string
url
required

HTTP JSON-RPC endpoint, without credentials

string
username
required
string
websocket_url
required

Empty when live updates are disabled

string

Example

{
"shutdown": "inherit",
"status": {
"state": "connected"
}
}

Error

Media typeapplication/problem+json
object
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object>
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}