Mycodo API (1.0)

Download OpenAPI specification:Download

A REST API for Mycodo

Authentication

apikey

Security Scheme Type API Key
Header parameter name: X-API-KEY

choices

Form choice operations

Show form choices for all controllers

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /choices/controllers
/api/choices/controllers

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "choices controllers":
    [
    ]
}

Show form choices for all input measurements

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /choices/inputs/measurements
/api/choices/inputs/measurements

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "choices inputs measurements":
    [
    ]
}

Show form choices for all math measurements

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /choices/maths/measurements
/api/choices/maths/measurements

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "choices maths measurements":
    [
    ]
}

Show form choices for all output devices

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /choices/outputs/devices
/api/choices/outputs/devices

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "choices outputs devices":
    [
    ]
}

Show form choices for all output measurements

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /choices/outputs/measurements
/api/choices/outputs/measurements

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "choices outputs measurements":
    [
    ]
}

Show form choices for all PID measurements

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /choices/pids/measurements
/api/choices/pids/measurements

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "choices pids measurements":
    [
    ]
}

controllers

Controller operations

Get the status of a controller

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the controller.

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /controllers/{unique_id}
/api/controllers/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "is_active": true
}

Activate or deactivate a controller

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the controller.

Request Body schema: application/json
activate
required
boolean

Activate (1) or deactivate (0) a controller.

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

post /controllers/{unique_id}
/api/controllers/{unique_id}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "activate": true
}

daemon

Daemon operations

Get the status of the daemon

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /daemon/
/api/daemon/

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "RAM": 0,
  • "is_running": true,
  • "python_virtual_env": true
}

Shut down the daemon

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

post /daemon/terminate
/api/daemon/terminate

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "terminated": true
}

inputs

Input operations

Show all input settings

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /inputs/
/api/inputs/

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "input settings":
    [
    ]
}

Show the settings for an input

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the input

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /inputs/{unique_id}
/api/inputs/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "device measurements":
    [
    ],
  • "input settings":
    {
    }
}

Force an input to acquire measurements

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the input.

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

post /inputs/{unique_id}/force-measurement
/api/inputs/{unique_id}/force-measurement

maths

Math operations

Show all math settings

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /maths/
/api/maths/

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "math settings":
    [
    ]
}

Show the settings for a math

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the math

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /maths/{unique_id}
/api/maths/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "device measurements":
    [
    ],
  • "math settings":
    {
    }
}

measurements

Measurement operations

Create a measurement

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the measurement

unit
required
string

The unit of the measurement

channel
required
integer

The channel of the measurement

value
required
string

the value of the measurement

Request Body schema: application/json
timestamp
string <date-time>

The timestamp of the measurement, in %Y-%m-%dT%H:%M:%S.%fZ format (e.g. 2019-04-15T18:07:00.392Z). (Optional; exclude to create a measurement with a timestamp of the current time)

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

post /measurements/create/{unique_id}/{unit}/{channel}/{value}
/api/measurements/create/{unique_id}/{unit}/{channel}/{value}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "timestamp": "2020-09-13T20:07:39Z"
}

Return a list of measurements found within a time range

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the measurement

unit
required
string

The unit of the measurement

channel
required
integer

The channel of the measurement

epoch_start
required
integer

The start time, as epoch. Set to 0 for none.

epoch_end
required
integer

The start time, as epoch. Set to 0 for none.

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /measurements/historical/{unique_id}/{unit}/{channel}/{epoch_start}/{epoch_end}
/api/measurements/historical/{unique_id}/{unit}/{channel}/{epoch_start}/{epoch_end}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "measurements":
    [
    ]
}

Return the value of a function of measurements found within a time range

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the measurement

unit
required
string

The unit of the measurement

channel
required
integer

The channel of the measurement

epoch_start
required
integer

The start time, as epoch. Set to 0 for none.

epoch_end
required
integer

The start time, as epoch. Set to 0 for none.

function
required
string

The InfluxDB function to apply to the measurements. For example, SUM, MIN, MAX, STDDEV, etc. See https://docs.influxdata.com/influxdb/v1.7/query_language/functions/ for more information.

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /measurements/historical_function/{unique_id}/{unit}/{channel}/{epoch_start}/{epoch_end}/{function}
/api/measurements/historical_function/{unique_id}/{unit}/{channel}/{epoch_start}/{epoch_end}/{function}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "value": 0
}

Return the last measurement found within a duration from the past to the present

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the measurement

unit
required
string

The unit of the measurement

channel
required
integer

The channel of the measurement

past_seconds
required
integer

How many seconds in the past to query.

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /measurements/last/{unique_id}/{unit}/{channel}/{past_seconds}
/api/measurements/last/{unique_id}/{unit}/{channel}/{past_seconds}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "time": "2020-09-13T20:07:39Z",
  • "value": 0
}

Return a list of measurements found within a duration from the past to the present

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the measurement

unit
required
string

The unit of the measurement

channel
required
integer

The channel of the measurement

past_seconds
required
integer

How many seconds in the past to query.

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /measurements/past/{unique_id}/{unit}/{channel}/{past_seconds}
/api/measurements/past/{unique_id}/{unit}/{channel}/{past_seconds}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "measurements":
    [
    ]
}

outputs

Output operations

Show all output settings and statuses

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /outputs/
/api/outputs/

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "output settings":
    [
    ],
  • "output states":
    {
    }
}

Show the settings and status for an output

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the output.

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /outputs/{unique_id}
/api/outputs/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "output device measurements":
    [
    ],
  • "output settings":
    {
    },
  • "output state": "string"
}

Change the state of an output

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the output.

Request Body schema: application/json
duration
number

The duration to keep a non-PWM output on, in seconds.

duty_cycle
number >= 0

The duty cycle to set a PWM output, in percent (%).

state
boolean

Set a non-PWM output state to on (True) or off (False).

volume
number >= 0

The volume to send to an output.

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

post /outputs/{unique_id}
/api/outputs/{unique_id}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "duration": 10,
  • "duty_cycle": 50,
  • "state": true,
  • "volume": 35
}

pids

PID operations

Show all pid settings

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /pids/
/api/pids/

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "pid settings":
    [
    ]
}

Show the settings for a pid

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the pid

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /pids/{unique_id}
/api/pids/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "device measurements":
    [
    ],
  • "pid settings":
    {
    }
}

settings

Settings operations

Show all device measurement settings

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/device_measurements
/api/settings/device_measurements

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "device measurement settings":
    [
    ]
}

Show the settings for all device measurements with the device_id

Authorizations:
path Parameters
device_id
required
string

The unique ID of the controller (Input, Math, etc.) for which the measurement belongs.

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/device_measurements/by_device_id/{device_id}
/api/settings/device_measurements/by_device_id/{device_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "device measurement settings":
    [
    ]
}

Show the settings for a device measurement with the unique_id

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the measurement

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/device_measurements/{unique_id}
/api/settings/device_measurements/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "channel": 0,
  • "conversion_id": "string",
  • "device_id": "string",
  • "device_type": "string",
  • "id": 0,
  • "invert_scale": true,
  • "is_enabled": true,
  • "measurement": "string",
  • "measurement_type": "string",
  • "name": "string",
  • "rescaled_measurement": "string",
  • "rescaled_unit": "string",
  • "scale_from_max": 0,
  • "scale_from_min": 0,
  • "scale_to_max": 0,
  • "scale_to_min": 0,
  • "unique_id": "string",
  • "unit": "string"
}

Show all input settings

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/inputs
/api/settings/inputs

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "input settings":
    [
    ]
}

Show the settings for an input

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the input

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/inputs/{unique_id}
/api/settings/inputs/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "adc_gain": 0,
  • "adc_resolution": 0,
  • "adc_sample_speed": "string",
  • "baud_rate": 0,
  • "bt_adapter": "string",
  • "calibrate_sensor_measure": "string",
  • "cmd_command": "string",
  • "custom_options": "string",
  • "datetime": "2020-09-13T20:07:39Z",
  • "deadline": 0,
  • "device": "string",
  • "ftdi_location": "string",
  • "gpio_location": 0,
  • "i2c_bus": 0,
  • "i2c_location": "string",
  • "id": 0,
  • "interface": "string",
  • "is_activated": true,
  • "is_preset": true,
  • "location": "string",
  • "log_level_debug": true,
  • "name": "string",
  • "period": 0,
  • "pin_clock": 0,
  • "pin_cs": 0,
  • "pin_miso": 0,
  • "pin_mosi": 0,
  • "port": 0,
  • "power_output_id": "string",
  • "pre_output_duration": 0,
  • "pre_output_during_measure": true,
  • "pre_output_id": "string",
  • "preset_name": "string",
  • "ref_ohm": 0,
  • "resolution": 0,
  • "resolution_2": 0,
  • "rpm_pulses_per_rev": 0,
  • "sample_time": 0,
  • "sensitivity": 0,
  • "sht_voltage": "string",
  • "start_offset": 0,
  • "switch_bouncetime": 0,
  • "switch_edge": "string",
  • "switch_reset_period": 0,
  • "thermocouple_type": "string",
  • "times_check": 0,
  • "uart_location": "string",
  • "unique_id": "string",
  • "weighting": 0
}

Show all math settings

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/maths
/api/settings/maths

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "math settings":
    [
    ]
}

Show the settings for an math

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the math

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/maths/{unique_id}
/api/settings/maths/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "difference_absolute": true,
  • "difference_reverse_order": true,
  • "dry_bulb_t_id": "string",
  • "dry_bulb_t_measure_id": "string",
  • "equation": "string",
  • "equation_input": "string",
  • "id": 0,
  • "inputs": "string",
  • "is_activated": true,
  • "log_level_debug": true,
  • "math_type": "string",
  • "max_difference": 0,
  • "max_measure_age": 0,
  • "name": "string",
  • "order_of_use": "string",
  • "period": 0,
  • "pressure_pa_id": "string",
  • "pressure_pa_measure_id": "string",
  • "start_offset": 0,
  • "unique_id": "string",
  • "unique_id_1": "string",
  • "unique_id_2": "string",
  • "unique_measurement_id_1": "string",
  • "unique_measurement_id_2": "string",
  • "wet_bulb_t_id": "string",
  • "wet_bulb_t_measure_id": "string"
}

Show all measurement settings

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/measurements
/api/settings/measurements

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "measurement settings":
    [
    ]
}

Show the settings for a measurement with the unique_id

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the measurement

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/measurements/{unique_id}
/api/settings/measurements/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "name": "string",
  • "name_safe": "string",
  • "unique_id": "string",
  • "units": "string"
}

Show all output settings

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/outputs
/api/settings/outputs

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "output settings":
    [
    ]
}

Show the settings for an output with the unique_id

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the output

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/outputs/{unique_id}
/api/settings/outputs/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "amps": 0,
  • "baud_rate": 0,
  • "channel": 0,
  • "conversion_id": "string",
  • "flow_rate": 0,
  • "i2c_bus": 0,
  • "id": 0,
  • "interface": "string",
  • "last_duration": 0,
  • "location": "string",
  • "measurement": "string",
  • "name": "string",
  • "off_command": "string",
  • "off_until": "2020-09-13T20:07:39Z",
  • "on_command": "string",
  • "on_duration": true,
  • "on_state": true,
  • "on_until": "2020-09-13T20:07:39Z",
  • "output_mode": "string",
  • "output_type": "string",
  • "pin": 0,
  • "protocol": 0,
  • "pulse_length": 0,
  • "pwm_command": "string",
  • "pwm_hertz": 0,
  • "pwm_invert_signal": true,
  • "pwm_library": "string",
  • "shutdown_value": 0,
  • "startup_value": 0,
  • "state_shutdown": "string",
  • "state_startup": "string",
  • "trigger_functions_at_start": true,
  • "unique_id": "string",
  • "unit": "string"
}

Show all pid settings

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/pids
/api/settings/pids

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "pid settings":
    [
    ]
}

Show the settings for a pid with the unique_id

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the pid

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/pids/{unique_id}
/api/settings/pids/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "autotune_activated": true,
  • "autotune_noiseband": 0,
  • "autotune_outstep": 0,
  • "band": 0,
  • "d": 0,
  • "direction": "string",
  • "i": 0,
  • "id": 0,
  • "integrator_max": 0,
  • "integrator_min": 0,
  • "is_activated": true,
  • "is_held": true,
  • "is_paused": true,
  • "is_preset": true,
  • "log_level_debug": true,
  • "lower_max_duration": 0,
  • "lower_min_duration": 0,
  • "lower_min_off_duration": 0,
  • "lower_output_id": "string",
  • "max_measure_age": 0,
  • "measurement": "string",
  • "method_end_time": "string",
  • "method_start_time": "string",
  • "name": "string",
  • "p": 0,
  • "period": 0,
  • "preset_name": "string",
  • "raise_max_duration": 0,
  • "raise_min_duration": 0,
  • "raise_min_off_duration": 0,
  • "raise_output_id": "string",
  • "setpoint": 0,
  • "setpoint_tracking_id": "string",
  • "setpoint_tracking_max_age": 0,
  • "setpoint_tracking_type": "string",
  • "start_offset": 0,
  • "store_lower_as_negative": true,
  • "unique_id": "string"
}

Show all trigger settings

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/triggers
/api/settings/triggers

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "trigger settings":
    [
    ]
}

Show the settings for a trigger with the unique_id

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the trigger

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/triggers/{unique_id}
/api/settings/triggers/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "date_offset_days": 0,
  • "edge_detected": "string",
  • "id": 0,
  • "is_activated": true,
  • "latitude": 0,
  • "log_level_debug": true,
  • "longitude": 0,
  • "measurement": "string",
  • "method_end_time": "string",
  • "method_start_time": "string",
  • "name": "string",
  • "output_duration": 0,
  • "output_duty_cycle": 0,
  • "output_state": "string",
  • "period": 0,
  • "program": "string",
  • "rise_or_set": "string",
  • "time_offset_minutes": 0,
  • "timer_end_time": "string",
  • "timer_start_offset": 0,
  • "timer_start_time": "string",
  • "trigger_actions_at_period": true,
  • "trigger_actions_at_start": true,
  • "trigger_type": "string",
  • "unique_id": "string",
  • "unique_id_1": "string",
  • "unique_id_2": "string",
  • "word": "string",
  • "zenith": 0
}

Show all unit settings

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/units
/api/settings/units

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "unit settings":
    [
    ]
}

Show the settings for a unit with the unique_id

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the unit

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/units/{unique_id}
/api/settings/units/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "name": "string",
  • "name_safe": "string",
  • "unique_id": "string",
  • "unit": "string"
}

Show all user settings

Authorizations:
header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/users
/api/settings/users

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "user settings":
    [
    ]
}

Show the settings for a user with the unique_id

Authorizations:
path Parameters
unique_id
required
string

The unique ID of the user

header Parameters
X-Fields
string <mask>

An optional fields mask

Responses

200

Success

401

Invalid API Key

403

Insufficient Permissions

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

500

Internal Server Error

get /settings/users/{unique_id}
/api/settings/users/{unique_id}

Response samples

Content type
application/vnd.mycodo.v1+json
Copy
Expand all Collapse all
{
  • "email": "string",
  • "id": 0,
  • "landing_page": "string",
  • "index_page": "string",
  • "language": "string",
  • "name": "string",
  • "role_id": 0,
  • "theme": "string",
  • "unique_id": "string"
}