Here is documentation on API methods.

First here are the specifications (JSON RPC 2.0) : http://www.jsonrpc.org/specification

Access to the API is via the url : URL_JEEDOM/core/api/jeeApi.php

Here is an example of configuring a Json object that can be used in the body of a request made by an HTTP agent: json { "jsonrpc": "2.0", "id": "007", "method": "event::changes", "params": { "apikey": "", "datetime": "0" } } ‘’

Divers

ping

Return pong, test communication with Jeedom

version

Returns the version of Jeedom

datetime

Returns the Jeedom datetime in microseconds

Config API

config::byKey

Returns a configuration value.

Json settings :

config::save

Saves a configuration value

Json settings :

JSON Event API

event::changes

Returns the list of changes since the datetime passed in parameter (must be in microseconds). You will also have in the response the current datetime of Jeedom (to be reused for the following query)

Json settings :

JSON Plugin API

plugin::listPlugin

Returns the list of all plugins

Json settings :

Object JSON API

jeeObject::all

Returns the list of all objects

jeeObject::full

Returns the list of all objects, with for each object all its equipment and for each equipment all its commands as well as their states (for commands of type info)

jeeObject::fullById

Returns an object with all its equipment and for each equipment all its commands as well as their states (for commands of type info)

Json settings :

jeeObject::byId

Returns the specified object

Settings:

jeeObject::fullById

Returns an object, its equipment and for each equipment all its commands as well as the cell states (for info type commands)

jeeObject::save

Returns the specified object

Settings:

JSON Summary API

summary::global

Returns the global summary for the key passed in parameter

Settings:

summary::byId

Returns the summary for the object id

Settings:

JSON EqLogic API

eqLogic::all

Returns the list of all equipment

eqLogic::fullById

Returns a device and its commands as well as their states (for info type commands)

Settings:

eqLogic::byId

Returns the specified equipment

Settings:

eqLogic::byType

Returns all equipment belonging to the specified type (plugin)

Settings:

eqLogic::byObjectId

Returns all equipment belonging to the specified object

Settings:

eqLogic::byTypeAndId

Returns an equipment table according to the parameters.

The return will be of the form array ('eqType1' ⇒array ('id'⇒…,' cmds' ⇒ array (….)), 'eqType2' ⇒array ('id'⇒…,' cmds' ⇒ array (….))….,id1 ⇒ array ('id'⇒…,' cmds '⇒ array (….)), id2 ⇒ array (' id'⇒…, 'cmds' ⇒ array(…​.))..)

Settings:

eqLogic::save

Returns the registered / created equipment

Settings:

JSON Cmd API

cmd::all

Returns the list of all commands

cmd::byId

Returns the specified command

Settings:

cmd::byEqLogicId

Returns all commands belonging to the specified equipment

Settings:

cmd::execCmd

Execute the specified command

Settings:

cmd::getStatistique

Returns the statistics on the order (only works on info and historical orders)

Settings:

cmd::getTendance

Returns the trend on the order (only works on info and historical orders)

Settings:

cmd::getHistory

Returns the order history (only works on info and historical orders)

Settings:

cmd::save

Returns the specified object

Settings:

cmd::event

Allows you to send a value to a command

Settings:

JSON Scenario API

scenario::all

Returns the list of all scenarios

scenario::byId

Returns the specified scenario

Settings:

scenario::export

Returns the export of the scenario as well as the human name from the script

Settings:

scenario::import

Allows you to import a scenario.

Settings:

scenario::changeState

Changes the state of the specified scenario.

Settings:

JSON Log API

log::get

Allows you to retrieve a log

Settings:

log::add

Allows to write in a log

Settings:

log::list

Get the Jeedom logs list

Settings:

log::empty

Empty a log

Settings:

log::remove

Allows you to delete a log

Settings:

JSON datastore API (variable)

datastore::byTypeLinkIdKey

Get the value of a variable stored in the datastore

Settings:

datastore::save

Stores the value of a variable in the datastore

Settings:

JSON Message API

message::all

Returns the list of all messages

message::add

Allows to write in a log

Settings:

message::removeAll

Delete all messages

JSON Interaction API

interact::tryToReply

Try to match a request with an interaction, execute the action and respond accordingly

Settings:

interactQuery::all

Returns the complete list of all interactions

JSON System API

jeedom::halt

Stop Jeedom

jeedom::reboot

Restart Jeedom

jeedom::isOk

Lets you know if the global state of Jeedom is OK

jeedom::update

Lets launch a Jeedom update

jeedom::backup

Allows you to launch a backup of Jeedom

jeedom::getUsbMapping

List of USB ports and names of USB keys connected to it

JSON Plugin API

plugin::install

Installation / Update of a given plugin

Settings:

plugin::remove

Deletion of a given plugin

Settings:

plugin::dependancyInfo

Returns information on the plugin dependency status

Settings:

plugin::dependancyInstall

Force installation of plugin dependencies

Settings:

plugin::deamonInfo

Returns information about the status of the plugin daemon

Settings:

plugin::deamonStart

Force the demon to start

Settings:

plugin::deamonStop

Force demon stop

Settings:

plugin::deamonChangeAutoMode

Change the management mode of the daemon

Settings:

JSON update API

update::all

Returns a list of all installed components, their versions and associated information

update::checkUpdate

Allows you to check for updates

update::update

Allows you to update Jeedom and all plugins

update::doUpdate

Settings:

JSON network API

network::restartDns

Force the (re) start of the Jeedom DNS

network::stopDns

Forces the DNS Jeedom to stop

network::dnsRun

JSON timeline API

timeline::all

Returns all elements of the timeline

timeline::listFolder

Returns all the folders (category) of the timeline

timeline::byFolder

Returns all the elements of the requested folder

Settings:

JSON User API

user::all

Returns the list of all users

user::save

Create or edit a user

Settings:

JSON API Examples

Here is an example of using the API. For the example below I use this php class which simplifies the use of the API.

Retrieving the list of objects :

`{.php} $jsonrpc = new jsonrpcClient('#URL_JEEDOM#/core/api/jeeApi.php', #API_KEY#); if ($ jsonrpc-> sendRequest ( 'jeeObject::all ', array())){ print_r ($ jsonrpc-> getResult ()); }else{ echo $ jsonrpc-> getError (); } ‘’

Execution of an order (with the option of a title and a message)

`{.php} $jsonrpc = new jsonrpcClient('#URL_JEEDOM#/core/api/jeeApi.php', #API_KEY#); if ($ jsonrpc-> sendRequest ( 'cmd::execCmd ', array (' id' => #cmd_id#, 'options '=> array (' title '=>' Cuckoo ',' message '=>' It works')))){ echo 'OK'; }else{ echo $ jsonrpc-> getError (); } ‘’

The API is of course usable with other languages (just a post on a page)

Nous utilisons des cookies pour vous garantir la meilleure expérience sur notre site web. Si vous continuez à utiliser ce site, nous supposerons que vous en êtes satisfait.