Parts#
The following classes allow interaction with a vessel’s individual parts.
See also
The parts guide walks the tree of parts, and explains fuel lines, stage numbers and part modules.
Parts#
Parts
Instances of this class are used to interact with the parts of a vessel.
An instance can be obtained by calling GET /space-center/vessel/(id)/parts.
A Parts object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/parts/(id)/all#
A list of all of the vessels parts.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.Part>)
- GET /space-center/parts/(id)/root#
The vessels root part.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (SpaceCenter.Part)
Note
See the discussion on Traversing the Tree.
- GET /space-center/parts/(id)/controlling#
The part from which the vessel is controlled. Returns
nullif the vessel has no control point, in which case it is oriented by its root part.Note
A vessel gets no control point when it is created by a decoupler or an undocking and none of its parts is a command module with crew aboard. A probe core does not give it one either. Assign this property to choose the control point, which is equivalent to “Control From Here” in game.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (SpaceCenter.Part?)
- PUT /space-center/parts/(id)/controlling#
The part from which the vessel is controlled. Returns
nullif the vessel has no control point, in which case it is oriented by its root part.Note
A vessel gets no control point when it is created by a decoupler or an undocking and none of its parts is a command module with crew aboard. A probe core does not give it one either. Assign this property to choose the control point, which is equivalent to “Control From Here” in game.
- Parameters:
id – The identifier of the Parts object.
- Request JSON Object:
value (SpaceCenter.Part?) – The new value.
- POST /space-center/parts/(id)/with-name#
A list of parts whose
GET /space-center/part/(id)/nameis name.- Parameters:
id – The identifier of the Parts object.
- Request JSON Object:
name (string) – The name of the part.
- Response JSON Object:
value (list<SpaceCenter.Part>)
- POST /space-center/parts/(id)/with-title#
A list of all parts whose
GET /space-center/part/(id)/titleis title.- Parameters:
id – The identifier of the Parts object.
- Request JSON Object:
title (string) – The title of the part.
- Response JSON Object:
value (list<SpaceCenter.Part>)
- POST /space-center/parts/(id)/with-tag#
A list of all parts whose
GET /space-center/part/(id)/tagis tag.- Parameters:
id – The identifier of the Parts object.
- Request JSON Object:
tag (string) – The name tag of the part.
- Response JSON Object:
value (list<SpaceCenter.Part>)
- POST /space-center/parts/(id)/with-module#
A list of all parts that contain a Module whose
GET /space-center/module/(id)/nameis module_name.- Parameters:
id – The identifier of the Parts object.
- Request JSON Object:
module_name (string) – The name of the module.
- Response JSON Object:
value (list<SpaceCenter.Part>)
- POST /space-center/parts/(id)/modules-with-name#
A list of modules (combined across all parts in the vessel) whose
GET /space-center/module/(id)/nameis module_name.- Parameters:
id – The identifier of the Parts object.
- Request JSON Object:
module_name (string) – The name of the module.
- Response JSON Object:
value (list<SpaceCenter.Module>)
- GET /space-center/parts/(id)/antennas#
A list of all antennas in the vessel.
Note
A part with several antennas has an entry for each. If RemoteTech is installed, this will always return an empty list. To interact with RemoteTech antennas, use the RemoteTech service APIs.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.Antenna>)
- GET /space-center/parts/(id)/cargo-bays#
A list of all cargo bays in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.CargoBay>)
- GET /space-center/parts/(id)/control-surfaces#
A list of all control surfaces in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.ControlSurface>)
- GET /space-center/parts/(id)/decouplers#
A list of all decouplers in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.Decoupler>)
- GET /space-center/parts/(id)/docking-ports#
A list of all docking ports in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.DockingPort>)
- GET /space-center/parts/(id)/engines#
A list of all engines in the vessel.
Note
This includes any part that generates thrust. This covers many different types of engine, including liquid fuel rockets, solid rocket boosters, jet engines and RCS thrusters.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.Engine>)
- GET /space-center/parts/(id)/experiments#
A list of all science experiments in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.Experiment>)
- GET /space-center/parts/(id)/fairings#
A list of all fairings in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.Fairing>)
- GET /space-center/parts/(id)/intakes#
A list of all intakes in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.Intake>)
- GET /space-center/parts/(id)/legs#
A list of all landing legs attached to the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.Leg>)
- GET /space-center/parts/(id)/launch-clamps#
A list of all launch clamps attached to the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.LaunchClamp>)
- GET /space-center/parts/(id)/lights#
A list of all lights in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.Light>)
- GET /space-center/parts/(id)/parachutes#
A list of all parachutes in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.Parachute>)
- GET /space-center/parts/(id)/radiators#
A list of all radiators in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.Radiator>)
- GET /space-center/parts/(id)/resource-drains#
A list of all resource drains in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.ResourceDrain>)
- GET /space-center/parts/(id)/rcs#
A list of all RCS blocks/thrusters in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.RCS>)
- GET /space-center/parts/(id)/reaction-wheels#
A list of all reaction wheels in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.ReactionWheel>)
- GET /space-center/parts/(id)/resource-converters#
A list of all resource converters in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.ResourceConverter>)
- GET /space-center/parts/(id)/resource-harvesters#
A list of all resource harvesters in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.ResourceHarvester>)
- GET /space-center/parts/(id)/robotic-controllers#
A list of all robotic controllers in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.RoboticController>)
- GET /space-center/parts/(id)/robotic-hinges#
A list of all robotic hinges in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.RoboticHinge>)
- GET /space-center/parts/(id)/robotic-pistons#
A list of all robotic pistons in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.RoboticPiston>)
- GET /space-center/parts/(id)/robotic-rotations#
A list of all robotic rotations in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.RoboticRotation>)
- GET /space-center/parts/(id)/robotic-rotors#
A list of all robotic rotors in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.RoboticRotor>)
- GET /space-center/parts/(id)/sensors#
A list of all sensors in the vessel.
- Parameters:
id – The identifier of the Parts object.
- Response JSON Object:
value (list<SpaceCenter.Sensor>)
Part#
Part
Represents an individual part. Vessels are made up of multiple parts. Instances of this class can be obtained by several methods in Parts.
A Part object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/part/(id)/name#
Internal name of the part, as used in part cfg files. For example “Mark1-2Pod”.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (string)
- GET /space-center/part/(id)/title#
Title of the part, as shown when the part is right clicked in-game. For example “Mk1-2 Command Pod”.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (string)
- GET /space-center/part/(id)/config#
The static configuration of the part, as found in its part cfg file. This provides access to data that is not exposed elsewhere, such as the configuration of the part’s modules. Returns
nullif the part has no associated configuration node.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.ConfigNode)
- GET /space-center/part/(id)/tag#
The name tag for the part. Can be set to a custom string using the in-game user interface. Throws an exception if no name tag part module is installed.
Note
Requires KSPCommunityPartModules 0.5 or later, or kOS, which share one name tag.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (string)
- PUT /space-center/part/(id)/tag#
The name tag for the part. Can be set to a custom string using the in-game user interface. Throws an exception if no name tag part module is installed.
Note
Requires KSPCommunityPartModules 0.5 or later, or kOS, which share one name tag.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
value (string) – The new value.
- GET /space-center/part/(id)/flag-url#
The asset URL for the part’s flag.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (string)
- PUT /space-center/part/(id)/flag-url#
The asset URL for the part’s flag.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
value (string) – The new value.
- GET /space-center/part/(id)/highlighted#
Whether the part is highlighted.
Note
The highlighting is removed when the client that enabled it disconnects.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (bool)
- PUT /space-center/part/(id)/highlighted#
Whether the part is highlighted.
Note
The highlighting is removed when the client that enabled it disconnects.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/part/(id)/highlight-color#
The color used to highlight the part.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (StdLib.ColorRGB)
- PUT /space-center/part/(id)/highlight-color#
The color used to highlight the part.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
value (StdLib.ColorRGB) – The new value.
- GET /space-center/part/(id)/cost#
The cost of the part with its resources full, in units of funds.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/vessel#
The vessel that contains this part.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Vessel)
- GET /space-center/part/(id)/parent#
The parts parent. Returns
nullif the part does not have a parent. This, in combination withGET /space-center/part/(id)/children, can be used to traverse the vessels parts tree.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Part?)
Note
See the discussion on Traversing the Tree.
- GET /space-center/part/(id)/children#
The parts children. Returns an empty list if the part has no children. This, in combination with
GET /space-center/part/(id)/parent, can be used to traverse the vessels parts tree.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (list<SpaceCenter.Part>)
Note
See the discussion on Traversing the Tree.
- GET /space-center/part/(id)/axially-attached#
Whether the part is axially attached to its parent, i.e. on the top or bottom of its parent. If the part has no parent, returns
false.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (bool)
Note
See the discussion on Attachment Modes.
- GET /space-center/part/(id)/radially-attached#
Whether the part is radially attached to its parent, i.e. on the side of its parent. If the part has no parent, returns
false.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (bool)
Note
See the discussion on Attachment Modes.
- GET /space-center/part/(id)/stage#
The stage in which this part will be activated. Returns -1 if the part is not activated by staging.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (int32)
Note
See the discussion on Staging.
- GET /space-center/part/(id)/decouple-stage#
The stage in which this part will be decoupled. Returns -1 if the part is never decoupled from the vessel.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (int32)
Note
See the discussion on Staging.
- GET /space-center/part/(id)/massless#
Whether the part is massless.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (bool)
- GET /space-center/part/(id)/mass#
The current mass of the part, including resources it contains, in kilograms. Returns zero if the part is massless.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/dry-mass#
The mass of the part, not including any resources it contains, in kilograms. Returns zero if the part is massless.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/shielded#
Whether the part is shielded from the exterior of the vessel, for example by a fairing.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (bool)
- GET /space-center/part/(id)/dynamic-pressure#
The dynamic pressure acting on the part, in Pascals.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/static-pressure#
The static pressure acting on the part, in Pascals. Below the waterline this includes the pressure of the water.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/displacement#
The volume of water the part displaces when fully submerged, in \(\mathrm{m^{3}}\).
Note
See
GET /space-center/part/(id)/displaced-volumefor the volume it is displacing now.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/buoyancy-multiplier#
The multiplier applied to the buoyant force on the part. One for most parts.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- POST /space-center/part/(id)/buoyant-force-at#
The buoyant force on the part when fully submerged in a fluid of the given density, in Newtons.
Note
Applies
GET /space-center/buoyancy-scalarandGET /space-center/part/(id)/buoyancy-multiplier, so the result is what the game would do to the part rather than what Archimedes’ principle alone gives.- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
density (double) – The density of the fluid, in \(\mathrm{kg/m^{3}}\).
gravity (double) – The acceleration due to gravity, in \(\mathrm{m/s^{2}}\).
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/splashed#
Whether the part is in contact with water.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (bool)
- GET /space-center/part/(id)/submerged-portion#
The fraction of the part below the waterline, between 0 and 1.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/displaced-volume#
The volume of water the part is displacing, in \(\mathrm{m^{3}}\).
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/depth#
The depth of the part below the waterline, in meters, measured at
POST /space-center/part/(id)/center-of-displacement. Negative above the waterline. Returns zero if the body the vessel is at has no ocean.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/min-depth#
The depth of the shallowest point of the part below the waterline, in meters. Returns zero if the body the vessel is at has no ocean.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/max-depth#
The depth of the deepest point of the part below the waterline, in meters. Returns zero if the body the vessel is at has no ocean.
Note
The game ramps the buoyant force in over the first fraction of a meter of this depth.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/submerged-dynamic-pressure#
The dynamic pressure of the water acting on the part, in Pascals.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/submerged-drag-multiplier#
The multiplier applied to the drag on the part while it is submerged.
Note
The game sets this high on splashdown and eases it down as the part moves through the water. It climbs back once the part slows to a crawl, so a hull under way reads lower than one lying still.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/submerged-lift-multiplier#
The multiplier applied to the lift on the part while it is submerged.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/water-angular-drag-multiplier#
The multiplier applied to the angular drag on the part while it is submerged.
Note
Part of the part’s configuration rather than a live readout, so it reads the same in the editor and at a body with no ocean.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/impact-tolerance#
The crash tolerance of the part, in \(\mathrm{m/s}\).
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/breaking-force#
The breaking force of the part’s attachments, in \(\mathrm{kN}\).
Note
The joint to the parent part takes the lower breaking force of the two parts, scaled by the size of the attachment node. See
GET /space-center/part/(id)/joint-break-force.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/breaking-torque#
The breaking torque of the part’s attachments, in \(\mathrm{kN \cdot m}\).
Note
The joint to the parent part takes the lower breaking torque of the two parts, scaled by the size of the attachment node. See
GET /space-center/part/(id)/joint-break-torque.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/joint-break-force#
The force that breaks the joint to the parent part, in \(\mathrm{kN}\). Throws an exception if the part has no joint to its parent part.
Note
The sum over the joint’s physics joints. It is infinite for a short time after the vessel loads, such as just after launch. The root part and a physicsless part have no joint to their parent.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/joint-break-torque#
The torque that breaks the joint to the parent part, in \(\mathrm{kN \cdot m}\). Throws an exception if the part has no joint to its parent part.
Note
The sum over the joint’s physics joints. It is infinite for a short time after the vessel loads. On a stack node of size 2 or more, the physics joints sit apart around the node. A bending moment then breaks the joint when one physics joint’s force exceeds its share of
GET /space-center/part/(id)/joint-break-force, usually at a much larger moment than this torque.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/joint-spring#
The spring constant of the joint to the parent part against translation, in \(\mathrm{kN/m}\). Throws an exception if the part has no joint to its parent part.
Note
The sum over the joint’s physics joints. A rigid attachment locks the joint, and this spring then has no effect.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/joint-damper#
The damping constant of the joint to the parent part against translation, in \(\mathrm{kN \cdot s/m}\). Throws an exception if the part has no joint to its parent part.
Note
The sum over the joint’s physics joints. The stock game sets it to zero, and mods such as Kerbal Joint Reinforcement change it.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/joint-angular-spring#
The spring constant of the joint to the parent part against bending, in \(\mathrm{kN \cdot m/rad}\). Throws an exception if the part has no joint to its parent part.
Note
The sum over the joint’s physics joints, about the two axes perpendicular to the joint axis. The joint is far stiffer against twisting about its axis. On a stack node of size 2 or more, the physics joints sit apart around the node, and the joint bends much less than this spring gives. A rigid attachment makes it infinite.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/joint-angular-damper#
The damping constant of the joint to the parent part against bending, in \(\mathrm{kN \cdot m \cdot s/rad}\). Throws an exception if the part has no joint to its parent part.
Note
The sum over the joint’s physics joints. The stock game sets it to zero, and mods such as Kerbal Joint Reinforcement change it.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/temperature#
Temperature of the part, in Kelvin.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/skin-temperature#
Temperature of the skin of the part, in Kelvin.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/max-temperature#
Maximum temperature that the part can survive, in Kelvin.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/max-skin-temperature#
Maximum temperature that the skin of the part can survive, in Kelvin.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/max-pressure#
Maximum pressure that the part can survive, in Pascals.
Note
With part pressure limits enabled in the difficulty settings, the part is destroyed when
GET /space-center/part/(id)/static-pressureplusGET /space-center/part/(id)/dynamic-pressureexceeds this.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
- GET /space-center/part/(id)/thermal-mass#
A measure of how much energy it takes to increase the internal temperature of the part, in Joules per Kelvin.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/thermal-skin-mass#
A measure of how much energy it takes to increase the skin temperature of the part, in Joules per Kelvin.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/thermal-resource-mass#
A measure of how much energy it takes to increase the temperature of the resources contained in the part, in Joules per Kelvin.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/thermal-conduction-flux#
The rate at which heat energy is conducting into or out of the part via contact with other parts. Measured in energy per unit time, or power, in Watts. A positive value means the part is gaining heat energy, and negative means it is losing heat energy.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/thermal-convection-flux#
The rate at which heat energy is convecting into or out of the part from the surrounding atmosphere. Measured in energy per unit time, or power, in Watts. A positive value means the part is gaining heat energy, and negative means it is losing heat energy.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/thermal-radiation-flux#
The rate at which heat energy is radiating into or out of the part from the surrounding environment. Measured in energy per unit time, or power, in Watts. A positive value means the part is gaining heat energy, and negative means it is losing heat energy.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/thermal-internal-flux#
The rate at which heat energy is begin generated by the part. For example, some engines generate heat by combusting fuel. Measured in energy per unit time, or power, in Watts. A positive value means the part is gaining heat energy, and negative means it is losing heat energy.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/thermal-skin-to-internal-flux#
The rate at which heat energy is transferring between the part’s skin and its internals. Measured in energy per unit time, or power, in Watts. A positive value means the part’s internals are gaining heat energy, and negative means its skin is gaining heat energy.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (float)
- GET /space-center/part/(id)/crew-capacity#
The number of crew members that can occupy the part.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (int32)
- GET /space-center/part/(id)/crew#
The crew members occupying the part.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (list<SpaceCenter.CrewMember>)
- GET /space-center/part/(id)/available-seats#
How many open seats the part has.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (uint32)
- GET /space-center/part/(id)/resources#
A
GET /space-center/part/(id)/resourcesobject for the part.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Resources)
- GET /space-center/part/(id)/crossfeed#
Whether this part is crossfeed capable.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (bool)
- GET /space-center/part/(id)/is-fuel-line#
Whether this part is a fuel line.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (bool)
- GET /space-center/part/(id)/fuel-lines-from#
The parts that are connected to this part via fuel lines, where the direction of the fuel line is into this part.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (list<SpaceCenter.Part>)
Note
See the discussion on Fuel Lines.
- GET /space-center/part/(id)/fuel-lines-to#
The parts that are connected to this part via fuel lines, where the direction of the fuel line is out of this part.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (list<SpaceCenter.Part>)
Note
See the discussion on Fuel Lines.
- GET /space-center/part/(id)/modules#
The modules for this part.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (list<SpaceCenter.Module>)
- GET /space-center/part/(id)/antenna#
An
GET /space-center/part/(id)/antennaif the part is an antenna, otherwisenull.Note
For a part with several antennas, this is the first.
GET /space-center/parts/(id)/antennaslists them all. If RemoteTech is installed, this will always returnnull. To interact with RemoteTech antennas, use the RemoteTech service APIs.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Antenna?)
- GET /space-center/part/(id)/cargo-bay#
A
GET /space-center/part/(id)/cargo-bayif the part is a cargo bay, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.CargoBay?)
- GET /space-center/part/(id)/control-surface#
A
GET /space-center/part/(id)/control-surfaceif the part is an aerodynamic control surface, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.ControlSurface?)
- GET /space-center/part/(id)/decoupler#
A
GET /space-center/part/(id)/decouplerif the part is a decoupler, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Decoupler?)
- GET /space-center/part/(id)/docking-port#
A
GET /space-center/part/(id)/docking-portif the part is a docking port, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.DockingPort?)
- GET /space-center/part/(id)/engine#
An
GET /space-center/part/(id)/engineif the part is an engine, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Engine?)
- GET /space-center/part/(id)/experiment#
An
GET /space-center/part/(id)/experimentif the part contains a single science experiment, otherwisenull.Note
Throws an exception if the part contains more than one experiment. In that case, use
GET /space-center/part/(id)/experimentsto get the list of experiments in the part.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Experiment?)
- GET /space-center/part/(id)/experiments#
A list of
GET /space-center/part/(id)/experimentobjects that the part contains.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (list<SpaceCenter.Experiment>?)
- GET /space-center/part/(id)/fairing#
A
GET /space-center/part/(id)/fairingif the part is a fairing, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Fairing?)
- GET /space-center/part/(id)/intake#
An
GET /space-center/part/(id)/intakeif the part is an intake, otherwisenull.Note
This includes any part that generates thrust. This covers many different types of engine, including liquid fuel rockets, solid rocket boosters and jet engines. For RCS thrusters see
GET /space-center/part/(id)/rcs.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Intake?)
- GET /space-center/part/(id)/leg#
A
GET /space-center/part/(id)/legif the part is a landing leg, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Leg?)
- GET /space-center/part/(id)/launch-clamp#
A
GET /space-center/part/(id)/launch-clampif the part is a launch clamp, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.LaunchClamp?)
- GET /space-center/part/(id)/light#
A
GET /space-center/part/(id)/lightif the part is a light, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Light?)
- GET /space-center/part/(id)/parachute#
A
GET /space-center/part/(id)/parachuteif the part is a parachute, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Parachute?)
- GET /space-center/part/(id)/radiator#
A
GET /space-center/part/(id)/radiatorif the part is a radiator, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Radiator?)
- GET /space-center/part/(id)/resource-drain#
A
GET /space-center/part/(id)/resource-drainif the part is a resource drain, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.ResourceDrain?)
- GET /space-center/part/(id)/rcs#
A
GET /space-center/part/(id)/rcsif the part is an RCS block/thruster, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.RCS?)
- GET /space-center/part/(id)/reaction-wheel#
A
GET /space-center/part/(id)/reaction-wheelif the part is a reaction wheel, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.ReactionWheel?)
- GET /space-center/part/(id)/resource-converter#
A
GET /space-center/part/(id)/resource-converterif the part is a resource converter, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.ResourceConverter?)
- GET /space-center/part/(id)/resource-harvester#
A
GET /space-center/part/(id)/resource-harvesterif the part is a resource harvester, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.ResourceHarvester?)
- GET /space-center/part/(id)/robotic-controller#
A
GET /space-center/part/(id)/robotic-controllerif the part is a robotic controller, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.RoboticController?)
- GET /space-center/part/(id)/robotic-hinge#
A
GET /space-center/part/(id)/robotic-hingeif the part is a robotic hinge, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.RoboticHinge?)
- GET /space-center/part/(id)/robotic-piston#
A
GET /space-center/part/(id)/robotic-pistonif the part is a robotic piston, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.RoboticPiston?)
- GET /space-center/part/(id)/robotic-rotation#
A
GET /space-center/part/(id)/robotic-rotationif the part is a robotic rotation servo, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.RoboticRotation?)
- GET /space-center/part/(id)/robotic-rotor#
A
GET /space-center/part/(id)/robotic-rotorif the part is a robotic rotor, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.RoboticRotor?)
- GET /space-center/part/(id)/sensor#
A
GET /space-center/part/(id)/sensorif the part is a sensor, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Sensor?)
- GET /space-center/part/(id)/solar-panel#
A
GET /space-center/part/(id)/solar-panelif the part is a solar panel, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.SolarPanel?)
- GET /space-center/part/(id)/wheel#
A
GET /space-center/part/(id)/wheelif the part is a wheel, otherwisenull.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.Wheel?)
- POST /space-center/part/(id)/position#
The position of the part in the given reference frame.
Note
This is a fixed position in the part, defined by the parts model. It s not necessarily the same as the parts center of mass. Use
POST /space-center/part/(id)/center-of-massto get the parts center of mass.- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned position vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – The position as a vector.
- POST /space-center/part/(id)/center-of-mass#
The position of the parts center of mass in the given reference frame. If the part is physicsless in flight, this is equivalent to
POST /space-center/part/(id)/position.- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned position vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – The position as a vector.
- POST /space-center/part/(id)/bounding-box#
The axis-aligned bounding box of the part in the given reference frame.
Note
This is computed from the meshes that make up the parts model, and covers only this part - the models of any child parts are excluded. If the part has no visible model, the box has zero volume and is centered on the
POST /space-center/part/(id)/center-of-massof the part.- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned position vectors are in.
- Response JSON Object:
value (SpaceCenter.BoundingBox) – The positions of the minimum and maximum vertices of the box.
- POST /space-center/part/(id)/direction#
The direction the part points in, in the given reference frame.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned direction is in.
- Response JSON Object:
value (tuple<double, double, double>) – The direction as a unit vector.
- POST /space-center/part/(id)/velocity#
The linear velocity of the part in the given reference frame.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned velocity vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – The velocity as a vector. The vector points in the direction of travel, and its magnitude is the speed of the body in \(\mathrm{m/s}\).
- POST /space-center/part/(id)/rotation#
The rotation of the part, in the given reference frame.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned rotation is in.
- Response JSON Object:
value (tuple<double, double, double, double>) – The rotation as a quaternion of the form
(x, y, z, w).
- POST /space-center/part/(id)/lift#
The aerodynamic lift currently acting on the part.
Note
Not available when Ferram Aerospace Research is installed.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons.
- POST /space-center/part/(id)/drag#
The aerodynamic drag currently acting on the part.
Note
Not available when Ferram Aerospace Research is installed.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons.
- POST /space-center/part/(id)/center-of-buoyancy#
The point the buoyant force on the part acts at, in the given reference frame.
Note
A submerged part reports the point the game applied the force at, which it shifts towards the submerged part of the hull. Any other part reports its configured center of buoyancy.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned position vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – The position as a vector.
- POST /space-center/part/(id)/center-of-displacement#
The point the depth of the part is measured at, in the given reference frame.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned position vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – The position as a vector.
- POST /space-center/part/(id)/buoyant-force#
The buoyant force currently acting on the part.
Note
The buoyant force on its own. The water drag and lift the game applies alongside it are reported by
GET /space-center/part/(id)/submerged-drag-multiplierandGET /space-center/part/(id)/submerged-lift-multiplier.- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons.
- GET /space-center/part/(id)/moment-of-inertia#
The moment of inertia of the part in \(\mathrm{kg \cdot m^{2}}\) around its center of mass in the parts center of mass reference frame (
GET /space-center/part/(id)/center-of-mass-reference-frame).- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (tuple<double, double, double>)
- GET /space-center/part/(id)/inertia-tensor#
The inertia tensor of the part around its center of mass, in the parts center of mass reference frame (
GET /space-center/part/(id)/center-of-mass-reference-frame). Returns the 3x3 matrix as a list of elements, in row-major order.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (list<double>)
- GET /space-center/part/(id)/reference-frame#
The reference frame that is fixed relative to this part, and centered on a fixed position within the part, defined by the parts model.
The origin is at the position of the part, as returned by
POST /space-center/part/(id)/position.The axes rotate with the part.
The x, y and z axis directions depend on the design of the part.
Note
For docking port parts, this reference frame is not necessarily equivalent to the reference frame for the docking port, returned by
GET /space-center/docking-port/(id)/reference-frame.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.ReferenceFrame)
Mk1 Command Pod reference frame origin and axes#
- GET /space-center/part/(id)/center-of-mass-reference-frame#
The reference frame that is fixed relative to this part, and centered on its center of mass.
The origin is at the center of mass of the part, as returned by
POST /space-center/part/(id)/center-of-mass.The axes rotate with the part.
The x, y and z axis directions depend on the design of the part.
Note
For docking port parts, this reference frame is not necessarily equivalent to the reference frame for the docking port, returned by
GET /space-center/docking-port/(id)/reference-frame.- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.ReferenceFrame)
- POST /space-center/part/(id)/add-force#
Warning
Deprecated. Use
Debug.AddForceinstead.Exert a constant force on the part, acting at the given position.
Note
The force is removed when the client that added it disconnects.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
force (tuple<double, double, double>) – A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons.
position (tuple<double, double, double>) – The position at which the force acts, as a vector.
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the force and position are in.
- Response JSON Object:
value (SpaceCenter.Force) – An object that can be used to remove or modify the force.
- POST /space-center/part/(id)/instantaneous-force#
Warning
Deprecated. Use
Debug.InstantaneousForceinstead.Exert an instantaneous force on the part, acting at the given position.
Note
The force is applied instantaneously in a single physics update.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
force (tuple<double, double, double>) – A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons.
position (tuple<double, double, double>) – The position at which the force acts, as a vector.
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the force and position are in.
- PUT /space-center/part/(id)/glow#
Whether the part is glowing.
- Parameters:
id – The identifier of the Part object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/part/(id)/auto-strut-mode#
Auto-strut mode.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (SpaceCenter.AutoStrutMode)
- GET /space-center/part/(id)/has-real-fuels-tank#
Whether the part is a fuel tank managed by RealFuels. The remaining properties in this section are only available when it is.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (bool)
- GET /space-center/part/(id)/highly-pressurized#
Whether the tank is highly pressurized, which is what a pressure-fed engine needs to draw from (see
GET /space-center/engine/(id)/pressure-fed). Throws an exception if the part is not a RealFuels fuel tank (seeGET /space-center/part/(id)/has-real-fuels-tank).Note
Requires RealFuels.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (bool)
- GET /space-center/part/(id)/boiloff-rate#
The rate at which the tank’s cryogenic contents are boiling off, in kilograms per second of in-game time, measured over the last update RealFuels computed it in. The contents keep boiling off under time warp, where that update covers a much longer span of in-game time than a physics frame does. The rate is zero for a tank holding nothing cryogenic, for one still being fed by a launch clamp, whose temperature RealFuels holds down instead, and in the editor. Throws an exception if the part is not a RealFuels fuel tank (see
GET /space-center/part/(id)/has-real-fuels-tank).Note
Requires RealFuels.
- Parameters:
id – The identifier of the Part object.
- Response JSON Object:
value (double)
AutoStrutMode
The state of an auto-strut. GET /space-center/part/(id)/auto-strut-mode
Passed and returned as the name of one of its values:
"off"Off
"root"Root
"heaviest"Heaviest
"grandparent"Grandparent
"force_root"ForceRoot
"force_heaviest"ForceHeaviest
"force_grandparent"ForceGrandparent
Force
Obtained by calling Debug.AddForce.
A Force object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/force/(id)/part#
The part that this force is applied to.
- Parameters:
id – The identifier of the Force object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/force/(id)/force-vector#
The force vector, in Newtons.
- Parameters:
id – The identifier of the Force object.
- Response JSON Object:
value (tuple<double, double, double>) – A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons.
- PUT /space-center/force/(id)/force-vector#
The force vector, in Newtons.
- Parameters:
id – The identifier of the Force object.
- Request JSON Object:
value (tuple<double, double, double>) – The new value.
- GET /space-center/force/(id)/position#
The position at which the force acts, in reference frame
GET /space-center/force/(id)/reference-frame.- Parameters:
id – The identifier of the Force object.
- Response JSON Object:
value (tuple<double, double, double>) – The position as a vector.
- PUT /space-center/force/(id)/position#
The position at which the force acts, in reference frame
GET /space-center/force/(id)/reference-frame.- Parameters:
id – The identifier of the Force object.
- Request JSON Object:
value (tuple<double, double, double>) – The new value.
- GET /space-center/force/(id)/reference-frame#
The reference frame of the force vector and position.
- Parameters:
id – The identifier of the Force object.
- Response JSON Object:
value (SpaceCenter.ReferenceFrame)
Module#
Module
This can be used to interact with a specific part module. This includes part modules in stock KSP, and those added by mods.
In KSP, each part has zero or more PartModules associated with it. Each one contains some of the functionality of the part. For example, an engine has a “ModuleEngines” part module that contains all the functionality of an engine.
A Module object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/module/(id)/name#
Name of the PartModule. For example, “ModuleEngines”.
- Parameters:
id – The identifier of the Module object.
- Response JSON Object:
value (string)
- GET /space-center/module/(id)/part#
The part that contains this module.
- Parameters:
id – The identifier of the Module object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/module/(id)/config#
The static configuration of the module, as found in the part’s cfg file. This provides access to data that is not exposed as a field, such as the resources produced by a generator. Returns
nullif the module’s configuration node cannot be found.- Parameters:
id – The identifier of the Module object.
- Response JSON Object:
value (SpaceCenter.ConfigNode)
- GET /space-center/module/(id)/field-list#
A list of all the fields of the module, including those not visible in the right-click menu of the part. Filter by
GET /space-center/part-field/(id)/visibleto get just the visible ones.- Parameters:
id – The identifier of the Module object.
- Response JSON Object:
value (list<SpaceCenter.PartField>)
- GET /space-center/module/(id)/event-list#
A list of all the events of the module, including those not currently visible or active. Events are the clickable buttons visible in the right-click menu of the part. Filter by
GET /space-center/part-event/(id)/visibleandGET /space-center/part-event/(id)/activeto get just the ones shown in the menu.- Parameters:
id – The identifier of the Module object.
- Response JSON Object:
value (list<SpaceCenter.PartEvent>)
- GET /space-center/module/(id)/action-list#
A list of all the actions of the module. These are the parts actions that can be assigned to action groups in the in-game editor.
- Parameters:
id – The identifier of the Module object.
- Response JSON Object:
value (list<SpaceCenter.PartAction>)
PartField
A field of a part module. Obtained by calling GET /space-center/module/(id)/field-list.
Note
Setting a field runs the callbacks that the right-click menu of the part runs.
A PartField object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/part-field/(id)/module#
The part module that contains this field.
- Parameters:
id – The identifier of the PartField object.
- Response JSON Object:
value (SpaceCenter.Module)
- GET /space-center/part-field/(id)/name#
The identifier of the field. This is stable and does not change between game versions, unlike
GET /space-center/part-field/(id)/gui-name.- Parameters:
id – The identifier of the PartField object.
- Response JSON Object:
value (string)
- GET /space-center/part-field/(id)/gui-name#
The name of the field, as displayed in the right-click menu of the part. This may be empty for fields that are not visible in the menu.
- Parameters:
id – The identifier of the PartField object.
- Response JSON Object:
value (string)
- GET /space-center/part-field/(id)/visible#
Whether the field is visible in the right-click menu of the part, in the current scene (flight or editor).
- Parameters:
id – The identifier of the PartField object.
- Response JSON Object:
value (bool)
- GET /space-center/part-field/(id)/type#
The type of the field.
- Parameters:
id – The identifier of the PartField object.
- Response JSON Object:
value (SpaceCenter.FieldType)
- GET /space-center/part-field/(id)/value#
The value of the field, as a string. This works for fields of any type, and returns the same string that is shown in the right-click menu of the part.
Note
Setting the value using this property is only permitted for string fields. Use the typed properties (
GET /space-center/part-field/(id)/bool-value,GET /space-center/part-field/(id)/int-value,GET /space-center/part-field/(id)/float-value,GET /space-center/part-field/(id)/double-value) to set fields of other types.- Parameters:
id – The identifier of the PartField object.
- Response JSON Object:
value (string)
- PUT /space-center/part-field/(id)/value#
The value of the field, as a string. This works for fields of any type, and returns the same string that is shown in the right-click menu of the part.
Note
Setting the value using this property is only permitted for string fields. Use the typed properties (
GET /space-center/part-field/(id)/bool-value,GET /space-center/part-field/(id)/int-value,GET /space-center/part-field/(id)/float-value,GET /space-center/part-field/(id)/double-value) to set fields of other types.- Parameters:
id – The identifier of the PartField object.
- Request JSON Object:
value (string) – The new value.
- GET /space-center/part-field/(id)/bool-value#
The value of a boolean field.
Note
The getter throws an exception if the field is not a boolean field (see
GET /space-center/part-field/(id)/type).- Parameters:
id – The identifier of the PartField object.
- Response JSON Object:
value (bool)
- PUT /space-center/part-field/(id)/bool-value#
The value of a boolean field.
Note
The getter throws an exception if the field is not a boolean field (see
GET /space-center/part-field/(id)/type).- Parameters:
id – The identifier of the PartField object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/part-field/(id)/int-value#
The value of an integer field.
Note
The getter throws an exception if the field is not an integer field (see
GET /space-center/part-field/(id)/type).- Parameters:
id – The identifier of the PartField object.
- Response JSON Object:
value (int32)
- PUT /space-center/part-field/(id)/int-value#
The value of an integer field.
Note
The getter throws an exception if the field is not an integer field (see
GET /space-center/part-field/(id)/type).- Parameters:
id – The identifier of the PartField object.
- Request JSON Object:
value (int32) – The new value.
- GET /space-center/part-field/(id)/float-value#
The value of a single precision floating point field.
Note
The getter throws an exception if the field is not a single precision floating point field (see
GET /space-center/part-field/(id)/type).- Parameters:
id – The identifier of the PartField object.
- Response JSON Object:
value (float)
- PUT /space-center/part-field/(id)/float-value#
The value of a single precision floating point field.
Note
The getter throws an exception if the field is not a single precision floating point field (see
GET /space-center/part-field/(id)/type).- Parameters:
id – The identifier of the PartField object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/part-field/(id)/double-value#
The value of a double precision floating point field.
Note
The getter throws an exception if the field is not a double precision floating point field (see
GET /space-center/part-field/(id)/type).- Parameters:
id – The identifier of the PartField object.
- Response JSON Object:
value (double)
- PUT /space-center/part-field/(id)/double-value#
The value of a double precision floating point field.
Note
The getter throws an exception if the field is not a double precision floating point field (see
GET /space-center/part-field/(id)/type).- Parameters:
id – The identifier of the PartField object.
- Request JSON Object:
value (double) – The new value.
- POST /space-center/part-field/(id)/reset#
Set the value of the field to its original value.
Note
The original value is the value the field had when the part was loaded. Works for any field, including those not visible in the right-click menu.
- Parameters:
id – The identifier of the PartField object.
FieldType
The type of a part module field. See GET /space-center/part-field/(id)/type.
Passed and returned as the name of one of its values:
"boolean"A boolean field. Access using
GET /space-center/part-field/(id)/bool-value."integer"An integer field. Access using
GET /space-center/part-field/(id)/int-value."float"A single precision floating point field. Access using
GET /space-center/part-field/(id)/float-value."double"A double precision floating point field. Access using
GET /space-center/part-field/(id)/double-value."string"A string field. Access using
GET /space-center/part-field/(id)/value."unknown"A field whose type is not one of the above. Its value can still be read as a string using
GET /space-center/part-field/(id)/value.
PartEvent
An event of a part module. Events are the clickable buttons visible in the right-click menu
of the part. Obtained by calling GET /space-center/module/(id)/event-list.
A PartEvent object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/part-event/(id)/module#
The part module that contains this event.
- Parameters:
id – The identifier of the PartEvent object.
- Response JSON Object:
value (SpaceCenter.Module)
- GET /space-center/part-event/(id)/name#
The identifier of the event. This is stable and does not change between game versions, unlike
GET /space-center/part-event/(id)/gui-name.- Parameters:
id – The identifier of the PartEvent object.
- Response JSON Object:
value (string)
- GET /space-center/part-event/(id)/gui-name#
The name of the event, as displayed in the right-click menu of the part.
- Parameters:
id – The identifier of the PartEvent object.
- Response JSON Object:
value (string)
- GET /space-center/part-event/(id)/visible#
Whether the event is visible in the right-click menu of the part, in the current scene (flight or editor).
- Parameters:
id – The identifier of the PartEvent object.
- Response JSON Object:
value (bool)
- GET /space-center/part-event/(id)/active#
Whether the event is currently active.
- Parameters:
id – The identifier of the PartEvent object.
- Response JSON Object:
value (bool)
- POST /space-center/part-event/(id)/trigger#
Trigger the event. Equivalent to clicking the button in the right-click menu of the part.
- Parameters:
id – The identifier of the PartEvent object.
PartAction
An action of a part module. These are the part actions that can be assigned to action groups
in the in-game editor. Obtained by calling GET /space-center/module/(id)/action-list.
A PartAction object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/part-action/(id)/module#
The part module that contains this action.
- Parameters:
id – The identifier of the PartAction object.
- Response JSON Object:
value (SpaceCenter.Module)
- GET /space-center/part-action/(id)/name#
The identifier of the action. This is stable and does not change between game versions, unlike
GET /space-center/part-action/(id)/gui-name.- Parameters:
id – The identifier of the PartAction object.
- Response JSON Object:
value (string)
- GET /space-center/part-action/(id)/gui-name#
The name of the action, as displayed in the in-game editor.
- Parameters:
id – The identifier of the PartAction object.
- Response JSON Object:
value (string)
- PUT /space-center/part-action/(id)/activated#
Activate or deactivate the action. Equivalent to triggering the action from an action group. Set to
trueto activate the action, orfalseto deactivate it.- Parameters:
id – The identifier of the PartAction object.
- Request JSON Object:
value (bool) – The new value.
Config Node#
ConfigNode
Represents a configuration node, as found in a part’s configuration file. A node has a
name, a set of named values and a set of child nodes. This is used to access the
static configuration of a part or part module, for example via
GET /space-center/part/(id)/config and GET /space-center/module/(id)/config.
A ConfigNode object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/config-node/(id)/name#
The name of the configuration node. For example “MODULE”.
- Parameters:
id – The identifier of the ConfigNode object.
- Response JSON Object:
value (string)
- GET /space-center/config-node/(id)/values#
The values stored in the node, as a dictionary mapping names to values.
Note
If a name appears more than once, only the first value is included. Use
POST /space-center/config-node/(id)/find-valuesto get all of the values with a given name.- Parameters:
id – The identifier of the ConfigNode object.
- Response JSON Object:
value (dictionary<string, string>)
- POST /space-center/config-node/(id)/has-value#
Returns
trueif the node has a value with the given name.- Parameters:
id – The identifier of the ConfigNode object.
- Request JSON Object:
name (string) – Name of the value.
- Response JSON Object:
value (bool)
- POST /space-center/config-node/(id)/get-value#
Returns the value with the given name. If there is more than one value with the given name, the first is returned. Throws an exception if there is no value with the given name.
- Parameters:
id – The identifier of the ConfigNode object.
- Request JSON Object:
name (string) – Name of the value.
- Response JSON Object:
value (string)
- POST /space-center/config-node/(id)/find-values#
Returns all of the values with the given name, as a list.
- Parameters:
id – The identifier of the ConfigNode object.
- Request JSON Object:
name (string) – Name of the values.
- Response JSON Object:
value (list<string>)
- GET /space-center/config-node/(id)/nodes#
The child nodes contained in this node.
- Parameters:
id – The identifier of the ConfigNode object.
- Response JSON Object:
value (list<SpaceCenter.ConfigNode>)
- POST /space-center/config-node/(id)/has-node#
Returns
trueif the node has a child node with the given name.- Parameters:
id – The identifier of the ConfigNode object.
- Request JSON Object:
name (string) – Name of the child node.
- Response JSON Object:
value (bool)
- POST /space-center/config-node/(id)/get-node#
Returns the child node with the given name. If there is more than one child node with the given name, the first is returned. Throws an exception if there is no child node with the given name.
- Parameters:
id – The identifier of the ConfigNode object.
- Request JSON Object:
name (string) – Name of the child node.
- Response JSON Object:
value (SpaceCenter.ConfigNode)
- POST /space-center/config-node/(id)/find-nodes#
Returns all of the child nodes with the given name, as a list.
- Parameters:
id – The identifier of the ConfigNode object.
- Request JSON Object:
name (string) – Name of the child nodes.
- Response JSON Object:
value (list<SpaceCenter.ConfigNode>)
Specific Types of Part#
The following classes provide functionality for specific types of part.
Antenna#
Note
If RemoteTech is installed, use the RemoteTech service APIs to interact with antennas. This class covers stock and RealAntennas antennas.
Antenna
An antenna. Obtained by calling GET /space-center/part/(id)/antenna.
A Antenna object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/antenna/(id)/part#
The part object for this antenna.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/antenna/(id)/state#
The current state of the antenna.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (SpaceCenter.DeployableState)
- GET /space-center/antenna/(id)/deployable#
Whether the antenna is deployable.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (bool)
- GET /space-center/antenna/(id)/deployed#
Whether the antenna is deployed.
Note
Fixed antennas are always deployed. Throws KRPC.InvalidOperationException if set on a fixed antenna.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (bool)
- PUT /space-center/antenna/(id)/deployed#
Whether the antenna is deployed.
Note
Fixed antennas are always deployed. Throws KRPC.InvalidOperationException if set on a fixed antenna.
- Parameters:
id – The identifier of the Antenna object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/antenna/(id)/can-transmit#
Whether data can be transmitted by this antenna.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (bool)
- POST /space-center/antenna/(id)/transmit#
Transmit data.
- Parameters:
id – The identifier of the Antenna object.
- POST /space-center/antenna/(id)/cancel#
Cancel current transmission of data.
- Parameters:
id – The identifier of the Antenna object.
- GET /space-center/antenna/(id)/allow-partial#
Whether partial data transmission is permitted.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (bool)
- PUT /space-center/antenna/(id)/allow-partial#
Whether partial data transmission is permitted.
- Parameters:
id – The identifier of the Antenna object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/antenna/(id)/power#
The power of the antenna.
Note
Not used by RealAntennas, which replaces the stock range model.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (double)
- GET /space-center/antenna/(id)/combinable#
Whether the antenna can be combined with other antennae on the vessel to boost the power.
Note
Not used by RealAntennas, which replaces the stock range model.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (bool)
- GET /space-center/antenna/(id)/combinable-exponent#
Exponent used to calculate the combined power of multiple antennae on a vessel.
Note
Not used by RealAntennas, which replaces the stock range model.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (double)
- GET /space-center/antenna/(id)/packet-interval#
Interval between sending packets in seconds.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (float)
- GET /space-center/antenna/(id)/packet-size#
Amount of data sent per packet in Mits.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (float)
- GET /space-center/antenna/(id)/packet-resource-cost#
Units of electric charge consumed per packet sent.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (double)
- GET /space-center/antenna/(id)/gain#
The gain of the antenna, in \(\mathrm{dBi}\).
Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (float)
- GET /space-center/antenna/(id)/transmit-power#
Returns the transmit power of the antenna, in \(\mathrm{dBm}\), and sets it in the editor. Throws an exception if set in flight, or outside zero to
GET /space-center/antenna/(id)/max-transmit-power.Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (float)
- PUT /space-center/antenna/(id)/transmit-power#
Returns the transmit power of the antenna, in \(\mathrm{dBm}\), and sets it in the editor. Throws an exception if set in flight, or outside zero to
GET /space-center/antenna/(id)/max-transmit-power.Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/antenna/(id)/max-transmit-power#
The largest transmit power the antenna can be set to, in \(\mathrm{dBm}\).
Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (float)
- GET /space-center/antenna/(id)/tech-level#
Returns the tech level of the antenna, and sets it in the editor. Throws an exception if set in flight, or outside zero to
GET /space-center/antenna/(id)/max-tech-level.Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (int32)
- PUT /space-center/antenna/(id)/tech-level#
Returns the tech level of the antenna, and sets it in the editor. Throws an exception if set in flight, or outside zero to
GET /space-center/antenna/(id)/max-tech-level.Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Request JSON Object:
value (int32) – The new value.
- GET /space-center/antenna/(id)/max-tech-level#
The highest tech level the antenna can be set to.
Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (int32)
- GET /space-center/antenna/(id)/band#
The name of the radio frequency band the antenna uses, e.g.
"S".Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (string)
- GET /space-center/antenna/(id)/frequency#
The frequency of the antenna’s band, in Hz.
Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (double)
- GET /space-center/antenna/(id)/data-rate#
The highest data rate the antenna supports, in bits per second.
Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (double)
- GET /space-center/antenna/(id)/beamwidth#
The half-power beamwidth of the antenna, in degrees.
Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (double)
- GET /space-center/antenna/(id)/idle-power-draw#
The power the antenna draws while idle, in watts.
Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (double)
- GET /space-center/antenna/(id)/active-power-draw#
The power the antenna draws while transmitting, in watts. This includes
GET /space-center/antenna/(id)/idle-power-draw.Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (double)
- GET /space-center/antenna/(id)/enabled#
Returns whether the antenna is enabled, and sets it in the editor. Throws an exception if set in flight.
Note
Requires RealAntennas. A disabled antenna does not communicate and draws no power.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (bool)
- PUT /space-center/antenna/(id)/enabled#
Returns whether the antenna is enabled, and sets it in the editor. Throws an exception if set in flight.
Note
Requires RealAntennas. A disabled antenna does not communicate and draws no power.
- Parameters:
id – The identifier of the Antenna object.
- Request JSON Object:
value (bool) – The new value.
- POST /space-center/antenna/(id)/disable-permanently#
Disable the antenna for the rest of the flight. It then draws no power.
Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- GET /space-center/antenna/(id)/can-target#
Whether the antenna can be pointed at a target. Omnidirectional antennas cannot.
Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (bool)
- GET /space-center/antenna/(id)/target-mode#
The kind of target the antenna points at.
Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (SpaceCenter.AntennaTargetMode)
- GET /space-center/antenna/(id)/target-vessel#
Returns the vessel the antenna points at, and sets the vessel to point at.
Note
Requires RealAntennas.
nullif the antenna does not point at a vessel. Throws an exception if set tonull, or if the antenna cannot be pointed (seeGET /space-center/antenna/(id)/can-target).- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (SpaceCenter.Vessel?)
- PUT /space-center/antenna/(id)/target-vessel#
Returns the vessel the antenna points at, and sets the vessel to point at.
Note
Requires RealAntennas.
nullif the antenna does not point at a vessel. Throws an exception if set tonull, or if the antenna cannot be pointed (seeGET /space-center/antenna/(id)/can-target).- Parameters:
id – The identifier of the Antenna object.
- Request JSON Object:
value (SpaceCenter.Vessel?) – The new value.
- GET /space-center/antenna/(id)/target-body#
Returns the body the antenna points at, and sets the body to point at the center of.
Note
Requires RealAntennas. Also the body of a position the antenna points at, or
nullif it points at neither. Throws an exception if set tonull, or if the antenna cannot be pointed (seeGET /space-center/antenna/(id)/can-target).- Parameters:
id – The identifier of the Antenna object.
- Response JSON Object:
value (SpaceCenter.CelestialBody?)
- PUT /space-center/antenna/(id)/target-body#
Returns the body the antenna points at, and sets the body to point at the center of.
Note
Requires RealAntennas. Also the body of a position the antenna points at, or
nullif it points at neither. Throws an exception if set tonull, or if the antenna cannot be pointed (seeGET /space-center/antenna/(id)/can-target).- Parameters:
id – The identifier of the Antenna object.
- Request JSON Object:
value (SpaceCenter.CelestialBody?) – The new value.
- POST /space-center/antenna/(id)/target-direction#
The direction the antenna points in, in the given reference frame. Throws an exception if the antenna has no target (see
GET /space-center/antenna/(id)/target-mode).Note
Requires RealAntennas.
- Parameters:
id – The identifier of the Antenna object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned direction is in.
- Response JSON Object:
value (tuple<double, double, double>) – The direction as a unit vector.
- POST /space-center/antenna/(id)/set-target-position#
Point the antenna at a position on or above a body.
Note
Requires RealAntennas. Throws an exception if the antenna cannot be pointed (see
GET /space-center/antenna/(id)/can-target).- Parameters:
id – The identifier of the Antenna object.
- Request JSON Object:
body (SpaceCenter.CelestialBody) – The body.
latitude (double) – The latitude, in degrees.
longitude (double) – The longitude, in degrees.
altitude (double) – The altitude above sea level, in meters.
- POST /space-center/antenna/(id)/set-target-azimuth-elevation#
Point the antenna in a direction relative to the vessel’s position on the surface.
Note
Requires RealAntennas. Throws an exception if the antenna cannot be pointed (see
GET /space-center/antenna/(id)/can-target).- Parameters:
id – The identifier of the Antenna object.
- Request JSON Object:
azimuth (double) – The azimuth, in degrees clockwise from north, from 0 to 360.
elevation (double) – The elevation above the horizon, in degrees, from -90 to 90.
- POST /space-center/antenna/(id)/set-target-orbit-relative#
Point the antenna in a direction relative to the vessel’s orbital velocity.
Note
Requires RealAntennas. Throws an exception if the antenna cannot be pointed (see
GET /space-center/antenna/(id)/can-target).- Parameters:
id – The identifier of the Antenna object.
- Request JSON Object:
deflection (double) – The angle from the orbital velocity in the orbital plane, in degrees, from -180 to 180.
elevation (double) – The angle out of the orbital plane, in degrees, from -90 to 90.
AntennaTargetMode
The kind of target a RealAntennas antenna points at. See GET /space-center/antenna/(id)/target-mode.
Passed and returned as the name of one of its values:
"none"The antenna has no target. Omnidirectional antennas have none.
"vessel"A vessel. See
GET /space-center/antenna/(id)/target-vessel."body"The center of a body. See
GET /space-center/antenna/(id)/target-body."position"A position on or above a body. See
POST /space-center/antenna/(id)/set-target-position."azimuth_elevation"An azimuth and elevation from the vessel’s position. See
POST /space-center/antenna/(id)/set-target-azimuth-elevation."orbit_relative"A direction relative to the vessel’s orbital velocity. See
POST /space-center/antenna/(id)/set-target-orbit-relative.
Cargo Bay#
CargoBay
A cargo bay. Obtained by calling GET /space-center/part/(id)/cargo-bay.
A CargoBay object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/cargo-bay/(id)/part#
The part object for this cargo bay.
- Parameters:
id – The identifier of the CargoBay object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/cargo-bay/(id)/state#
The state of the cargo bay.
Note
This describes where the bay’s doors are, which is not the same as whether the parts inside are sheltered: a bay whose open end has nothing attached to it never shelters anything, however tightly shut it is. Use
GET /space-center/part/(id)/shieldedfor that.A cargo bay is never
"broken", as the game does not track damage for them.- Parameters:
id – The identifier of the CargoBay object.
- Response JSON Object:
value (SpaceCenter.DeployableState)
Control Surface#
ControlSurface
An aerodynamic control surface. Obtained by calling GET /space-center/part/(id)/control-surface.
A ControlSurface object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/control-surface/(id)/part#
The part object for this control surface.
- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/control-surface/(id)/pitch-enabled#
Whether the control surface has pitch control enabled.
- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (bool)
- PUT /space-center/control-surface/(id)/pitch-enabled#
Whether the control surface has pitch control enabled.
- Parameters:
id – The identifier of the ControlSurface object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/control-surface/(id)/yaw-enabled#
Whether the control surface has yaw control enabled.
- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (bool)
- PUT /space-center/control-surface/(id)/yaw-enabled#
Whether the control surface has yaw control enabled.
- Parameters:
id – The identifier of the ControlSurface object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/control-surface/(id)/roll-enabled#
Whether the control surface has roll control enabled.
- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (bool)
- PUT /space-center/control-surface/(id)/roll-enabled#
Whether the control surface has roll control enabled.
- Parameters:
id – The identifier of the ControlSurface object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/control-surface/(id)/authority-limiter#
The authority limiter for the control surface, which controls how far the control surface will move.
- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (float)
- PUT /space-center/control-surface/(id)/authority-limiter#
The authority limiter for the control surface, which controls how far the control surface will move.
- Parameters:
id – The identifier of the ControlSurface object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/control-surface/(id)/inverted#
Whether the control surface movement is inverted.
- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (bool)
- PUT /space-center/control-surface/(id)/inverted#
Whether the control surface movement is inverted.
- Parameters:
id – The identifier of the ControlSurface object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/control-surface/(id)/deployed#
Whether the control surface has been fully deployed. Throws an exception if set while
GET /space-center/control-surface/(id)/deflection-overrideis enabled, which holds the surface deployed.- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (bool)
- PUT /space-center/control-surface/(id)/deployed#
Whether the control surface has been fully deployed. Throws an exception if set while
GET /space-center/control-surface/(id)/deflection-overrideis enabled, which holds the surface deployed.- Parameters:
id – The identifier of the ControlSurface object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/control-surface/(id)/deploy-angle#
The deploy angle of the control surface, in degrees.
Note
Applied when
GET /space-center/control-surface/(id)/deployedis true, and clamped to the range given byGET /space-center/control-surface/(id)/min-deploy-angleandGET /space-center/control-surface/(id)/max-deploy-angle. WhileGET /space-center/control-surface/(id)/deflection-overrideis enabled,GET /space-center/control-surface/(id)/deflectiondrives the angle. A value set here takes effect when the override is released.- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (float)
- PUT /space-center/control-surface/(id)/deploy-angle#
The deploy angle of the control surface, in degrees.
Note
Applied when
GET /space-center/control-surface/(id)/deployedis true, and clamped to the range given byGET /space-center/control-surface/(id)/min-deploy-angleandGET /space-center/control-surface/(id)/max-deploy-angle. WhileGET /space-center/control-surface/(id)/deflection-overrideis enabled,GET /space-center/control-surface/(id)/deflectiondrives the angle. A value set here takes effect when the override is released.- Parameters:
id – The identifier of the ControlSurface object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/control-surface/(id)/min-deploy-angle#
The minimum
GET /space-center/control-surface/(id)/deploy-angleof the control surface, in degrees.- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (float)
- GET /space-center/control-surface/(id)/max-deploy-angle#
The maximum
GET /space-center/control-surface/(id)/deploy-angleof the control surface, in degrees.- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (float)
- GET /space-center/control-surface/(id)/deflection-override#
Whether the control surface deflection is being set directly, bypassing the vessel’s normal flight control. When enabled, the surface holds the deflection set by
GET /space-center/control-surface/(id)/deflectioninstead of responding to pitch, yaw and roll control inputs. The prior state is restored when the override is released, when the controlling client disconnects, or when the vessel changes.- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (bool)
- PUT /space-center/control-surface/(id)/deflection-override#
Whether the control surface deflection is being set directly, bypassing the vessel’s normal flight control. When enabled, the surface holds the deflection set by
GET /space-center/control-surface/(id)/deflectioninstead of responding to pitch, yaw and roll control inputs. The prior state is restored when the override is released, when the controlling client disconnects, or when the vessel changes.- Parameters:
id – The identifier of the ControlSurface object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/control-surface/(id)/deflection#
The deflection command applied when
GET /space-center/control-surface/(id)/deflection-overrideis enabled, as a value between -1 and 1, mapped onto the surface’s deploy angle range.- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (float)
- PUT /space-center/control-surface/(id)/deflection#
The deflection command applied when
GET /space-center/control-surface/(id)/deflection-overrideis enabled, as a value between -1 and 1, mapped onto the surface’s deploy angle range.- Parameters:
id – The identifier of the ControlSurface object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/control-surface/(id)/deflection-angle#
The current angle of the control surface from its neutral position, in degrees. Includes the
GET /space-center/control-surface/(id)/deploy-anglewhile the surface is deployed.- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (float)
- GET /space-center/control-surface/(id)/control-range#
The angle the control surface deflects by for a full control input, in degrees, before the
GET /space-center/control-surface/(id)/authority-limiteris applied.- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (float)
- GET /space-center/control-surface/(id)/actuator-speed#
The rate the control surface deflects at, in degrees per second.
- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (float)
- GET /space-center/control-surface/(id)/surface-area#
Surface area of the control surface in \(\mathrm{m^{2}}\).
- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (float)
- GET /space-center/control-surface/(id)/available-torque#
The available torque, in \(\mathrm{N \cdot m}\), that can be produced by this control surface, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the
GET /space-center/vessel/(id)/reference-frame.- Parameters:
id – The identifier of the ControlSurface object.
- Response JSON Object:
value (SpaceCenter.AxisRange)
Decoupler#
Decoupler
A decoupler. Obtained by calling GET /space-center/part/(id)/decoupler
A Decoupler object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/decoupler/(id)/part#
The part object for this decoupler.
- Parameters:
id – The identifier of the Decoupler object.
- Response JSON Object:
value (SpaceCenter.Part)
- POST /space-center/decoupler/(id)/decouple#
Fires the decoupler. Returns the new vessel created when the decoupler fires. Throws an exception if the decoupler has already fired.
Note
When called, the active vessel may change. It is therefore possible that, after calling this function, the object(s) returned by previous call(s) to
GET /space-center/active-vesselno longer refer to the active vessel.- Parameters:
id – The identifier of the Decoupler object.
- Response JSON Object:
value (SpaceCenter.Vessel)
- GET /space-center/decoupler/(id)/decoupled#
Whether the decoupler has fired.
- Parameters:
id – The identifier of the Decoupler object.
- Response JSON Object:
value (bool)
- GET /space-center/decoupler/(id)/staged#
Whether the decoupler is enabled in the staging sequence.
- Parameters:
id – The identifier of the Decoupler object.
- Response JSON Object:
value (bool)
- GET /space-center/decoupler/(id)/impulse#
The impulse that the decoupler imparts when it is fired, in \(\mathrm{N \cdot s}\).
- Parameters:
id – The identifier of the Decoupler object.
- Response JSON Object:
value (float)
Deployable State#
The deployment state shared by antennas, cargo bays, landing legs, radiators, resource harvesters, solar panels and wheels.
DeployableState
The state of a deployable part.
GET /space-center/antenna/(id)/state, GET /space-center/cargo-bay/(id)/state,
GET /space-center/leg/(id)/state, GET /space-center/radiator/(id)/state,
GET /space-center/resource-harvester/(id)/state, GET /space-center/solar-panel/(id)/state,
GET /space-center/wheel/(id)/state
Passed and returned as the name of one of its values:
"deployed"The part is fully deployed. A cargo bay in this state is fully open. Parts that cannot be retracted, such as fixed radiators, solar panels, antennas, landing legs and wheels, are always in this state.
"retracted"The part is fully retracted. A cargo bay in this state is closed and locked.
"deploying"The part is being deployed. A cargo bay in this state is opening.
"retracting"The part is being retracted. A cargo bay in this state is closing.
"broken"The part is broken. Cargo bays and resource harvesters never report this state, as the game does not track damage for them.
Docking Port#
DockingPort
A docking port. Obtained by calling GET /space-center/part/(id)/docking-port
A DockingPort object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/docking-port/(id)/part#
The part object for this docking port.
- Parameters:
id – The identifier of the DockingPort object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/docking-port/(id)/state#
The current state of the docking port.
- Parameters:
id – The identifier of the DockingPort object.
- Response JSON Object:
value (SpaceCenter.DockingPortState)
- GET /space-center/docking-port/(id)/docked-part#
The part that this docking port is docked to. Returns
nullif this docking port is not docked to anything.- Parameters:
id – The identifier of the DockingPort object.
- Response JSON Object:
value (SpaceCenter.Part?)
- POST /space-center/docking-port/(id)/undock#
Undocks the docking port and returns the new Vessel that is created. This method can be called for either docking port in a docked pair. Throws an exception if the docking port is not docked to anything.
Note
When called, the active vessel may change. It is therefore possible that, after calling this function, the object(s) returned by previous call(s) to
GET /space-center/active-vesselno longer refer to the active vessel.- Parameters:
id – The identifier of the DockingPort object.
- Response JSON Object:
value (SpaceCenter.Vessel)
- GET /space-center/docking-port/(id)/reengage-distance#
The distance a docking port must move away when it undocks before it becomes ready to dock with another port, in meters.
- Parameters:
id – The identifier of the DockingPort object.
- Response JSON Object:
value (float)
- GET /space-center/docking-port/(id)/has-shield#
Whether the docking port has a shield.
- Parameters:
id – The identifier of the DockingPort object.
- Response JSON Object:
value (bool)
- GET /space-center/docking-port/(id)/shielded#
The state of the docking ports shield, if it has one.
Returns
trueif the docking port has a shield, and the shield is closed. Otherwise returnsfalse. When set totrue, the shield is closed, and when set tofalsethe shield is opened. If the docking port does not have a shield, setting this attribute has no effect.- Parameters:
id – The identifier of the DockingPort object.
- Response JSON Object:
value (bool)
- PUT /space-center/docking-port/(id)/shielded#
The state of the docking ports shield, if it has one.
Returns
trueif the docking port has a shield, and the shield is closed. Otherwise returnsfalse. When set totrue, the shield is closed, and when set tofalsethe shield is opened. If the docking port does not have a shield, setting this attribute has no effect.- Parameters:
id – The identifier of the DockingPort object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/docking-port/(id)/can-rotate#
Whether the docking port can be commanded to rotate while docked.
- Parameters:
id – The identifier of the DockingPort object.
- Response JSON Object:
value (bool)
- GET /space-center/docking-port/(id)/maximum-rotation#
Maximum rotation angle in degrees.
- Parameters:
id – The identifier of the DockingPort object.
- Response JSON Object:
value (float)
- GET /space-center/docking-port/(id)/minimum-rotation#
Minimum rotation angle in degrees.
- Parameters:
id – The identifier of the DockingPort object.
- Response JSON Object:
value (float)
- GET /space-center/docking-port/(id)/rotation-target#
Rotation target angle in degrees.
- Parameters:
id – The identifier of the DockingPort object.
- Response JSON Object:
value (float)
- PUT /space-center/docking-port/(id)/rotation-target#
Rotation target angle in degrees.
- Parameters:
id – The identifier of the DockingPort object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/docking-port/(id)/rotation-locked#
Lock rotation. When locked, allows auto-strut to work across the joint.
- Parameters:
id – The identifier of the DockingPort object.
- Response JSON Object:
value (bool)
- PUT /space-center/docking-port/(id)/rotation-locked#
Lock rotation. When locked, allows auto-strut to work across the joint.
- Parameters:
id – The identifier of the DockingPort object.
- Request JSON Object:
value (bool) – The new value.
- POST /space-center/docking-port/(id)/position#
The position of the docking port, in the given reference frame.
- Parameters:
id – The identifier of the DockingPort object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned position vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – The position as a vector.
- POST /space-center/docking-port/(id)/direction#
The direction that docking port points in, in the given reference frame.
- Parameters:
id – The identifier of the DockingPort object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned direction is in.
- Response JSON Object:
value (tuple<double, double, double>) – The direction as a unit vector.
- POST /space-center/docking-port/(id)/rotation#
The rotation of the docking port, in the given reference frame.
- Parameters:
id – The identifier of the DockingPort object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned rotation is in.
- Response JSON Object:
value (tuple<double, double, double, double>) – The rotation as a quaternion of the form
(x, y, z, w).
- GET /space-center/docking-port/(id)/reference-frame#
The reference frame that is fixed relative to this docking port, and oriented with the port.
The origin is at the position of the docking port.
The axes rotate with the docking port.
The x-axis points out to the right side of the docking port.
The y-axis points in the direction the docking port is facing.
The z-axis points out of the bottom off the docking port.
Note
This reference frame is not necessarily equivalent to the reference frame for the part, returned by
GET /space-center/part/(id)/reference-frame.- Parameters:
id – The identifier of the DockingPort object.
- Response JSON Object:
value (SpaceCenter.ReferenceFrame)
Docking port reference frame origin and axes#
Inline docking port reference frame origin and axes#
DockingPortState
The state of a docking port. See GET /space-center/docking-port/(id)/state.
Passed and returned as the name of one of its values:
"ready"The docking port is ready to dock to another docking port.
"docked"The docking port is docked to another docking port, or docked to another part (from the VAB/SPH).
"docking"The docking port is very close to another docking port, but has not docked. It is using magnetic force to acquire a solid dock.
"undocking"The docking port has just been undocked from another docking port, and is disabled until it moves away by a sufficient distance (
GET /space-center/docking-port/(id)/reengage-distance)."shielded"The docking port has a shield, and the shield is closed.
"moving"The docking ports shield is currently opening/closing.
Engine#
Engine
An engine, including ones of various types.
For example liquid fuelled gimballed engines, solid rocket boosters and jet engines.
Obtained by calling GET /space-center/part/(id)/engine.
Note
For RCS thrusters GET /space-center/part/(id)/rcs.
A Engine object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/engine/(id)/part#
The part object for this engine.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/engine/(id)/active#
Whether the engine is active. Setting this attribute may have no effect, depending on
GET /space-center/engine/(id)/can-shutdownandGET /space-center/engine/(id)/can-restart.- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- PUT /space-center/engine/(id)/active#
Whether the engine is active. Setting this attribute may have no effect, depending on
GET /space-center/engine/(id)/can-shutdownandGET /space-center/engine/(id)/can-restart.- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/engine/(id)/thrust#
The current amount of thrust being produced by the engine, in Newtons.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (float)
- GET /space-center/engine/(id)/available-thrust#
The amount of thrust, in Newtons, that would be produced by the engine when activated and with its throttle set to 100%. Returns zero if the engine does not have any fuel. Takes the engine’s current
GET /space-center/engine/(id)/thrust-limitand atmospheric conditions into account.- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (float)
- POST /space-center/engine/(id)/available-thrust-at#
The amount of thrust, in Newtons, that would be produced by the engine when activated and with its throttle set to 100%. Returns zero if the engine does not have any fuel. Takes the given pressure into account.
- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
pressure (double) – Atmospheric pressure in atmospheres
- Response JSON Object:
value (float)
- GET /space-center/engine/(id)/max-thrust#
The amount of thrust, in Newtons, that would be produced by the engine when activated and fueled, with its throttle and throttle limiter set to 100%.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (float)
- POST /space-center/engine/(id)/max-thrust-at#
The amount of thrust, in Newtons, that would be produced by the engine when activated and fueled, with its throttle and throttle limiter set to 100%. Takes the given pressure into account.
- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
pressure (double) – Atmospheric pressure in atmospheres
- Response JSON Object:
value (float)
- GET /space-center/engine/(id)/max-vacuum-thrust#
The maximum amount of thrust that can be produced by the engine in a vacuum, in Newtons. This is the amount of thrust produced by the engine when activated,
GET /space-center/engine/(id)/thrust-limitis set to 100%, the main vessel’s throttle is set to 100% and the engine is in a vacuum.- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (float)
- GET /space-center/engine/(id)/thrust-limit#
The thrust limiter of the engine. A value between 0 and 1. Setting this attribute may have no effect, for example the thrust limit for a solid rocket booster cannot be changed in flight.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (float)
- PUT /space-center/engine/(id)/thrust-limit#
The thrust limiter of the engine. A value between 0 and 1. Setting this attribute may have no effect, for example the thrust limit for a solid rocket booster cannot be changed in flight.
- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/engine/(id)/thrusters#
The components of the engine that generate thrust.
Note
For example, this corresponds to the rocket nozzel on a solid rocket booster, or the individual nozzels on a RAPIER engine. The overall thrust produced by the engine, as reported by
GET /space-center/engine/(id)/available-thrust,GET /space-center/engine/(id)/max-thrustand others, is the sum of the thrust generated by each thruster.- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (list<SpaceCenter.Thruster>)
- GET /space-center/engine/(id)/specific-impulse#
The current specific impulse of the engine, in seconds. Returns zero if the engine is not active.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (float)
- POST /space-center/engine/(id)/specific-impulse-at#
The specific impulse of the engine under the given pressure, in seconds. Returns zero if the engine is not active.
- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
pressure (double) – Atmospheric pressure in atmospheres
- Response JSON Object:
value (float)
- GET /space-center/engine/(id)/vacuum-specific-impulse#
The vacuum specific impulse of the engine, in seconds.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (float)
- GET /space-center/engine/(id)/kerbin-sea-level-specific-impulse#
The specific impulse of the engine at sea level on Kerbin, in seconds.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (float)
- GET /space-center/engine/(id)/propellant-names#
The names of the propellants that the engine consumes.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (list<string>)
- GET /space-center/engine/(id)/propellant-ratios#
The ratio of resources that the engine consumes. A dictionary mapping resource names to the ratio at which they are consumed by the engine.
Note
For example, if the ratios are 0.6 for LiquidFuel and 0.4 for Oxidizer, then for every 0.6 units of LiquidFuel that the engine burns, it will burn 0.4 units of Oxidizer.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (dictionary<string, float>)
- GET /space-center/engine/(id)/propellants#
The propellants that the engine consumes.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (list<SpaceCenter.Propellant>)
- GET /space-center/engine/(id)/has-fuel#
Whether the engine has any fuel available.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- GET /space-center/engine/(id)/flameout#
Whether the engine has flamed out - it is active but has run out of propellant, so it is producing no thrust. This is the signal a client can use to decide when to activate the next stage. Note that on a vessel with drop tanks or asparagus staging some engines can flame out while others keep burning.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- GET /space-center/engine/(id)/throttle#
The current throttle setting for the engine. A value between 0 and 1. This is not necessarily the same as the vessel’s main throttle setting, as some engines take time to adjust their throttle (such as jet engines), or independent throttle may be enabled.
When the engine’s independent throttle is enabled (see
GET /space-center/engine/(id)/independent-throttle), can be used to set the throttle percentage.- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (float)
- PUT /space-center/engine/(id)/throttle#
The current throttle setting for the engine. A value between 0 and 1. This is not necessarily the same as the vessel’s main throttle setting, as some engines take time to adjust their throttle (such as jet engines), or independent throttle may be enabled.
When the engine’s independent throttle is enabled (see
GET /space-center/engine/(id)/independent-throttle), can be used to set the throttle percentage.- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/engine/(id)/throttle-locked#
Whether the
GET /space-center/control/(id)/throttleaffects the engine. For example, this istruefor liquid fueled rockets, andfalsefor solid rocket boosters.- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- GET /space-center/engine/(id)/independent-throttle#
Whether the independent throttle is enabled for the engine.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- PUT /space-center/engine/(id)/independent-throttle#
Whether the independent throttle is enabled for the engine.
- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/engine/(id)/can-restart#
Whether the engine can be restarted once shutdown. If the engine cannot be shutdown, returns
false. For example, this istruefor liquid fueled rockets andfalsefor solid rocket boosters.- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- GET /space-center/engine/(id)/can-shutdown#
Whether the engine can be shutdown once activated. For example, this is
truefor liquid fueled rockets andfalsefor solid rocket boosters.- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- GET /space-center/engine/(id)/has-modes#
Whether the engine has multiple modes of operation.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- GET /space-center/engine/(id)/mode#
The name of the current engine mode.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (string)
- PUT /space-center/engine/(id)/mode#
The name of the current engine mode.
- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (string) – The new value.
- GET /space-center/engine/(id)/modes#
The available modes for the engine. A dictionary mapping mode names to Engine objects.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (dictionary<string, SpaceCenter.Engine>)
- POST /space-center/engine/(id)/toggle-mode#
Toggle the current engine mode.
- Parameters:
id – The identifier of the Engine object.
- GET /space-center/engine/(id)/auto-mode-switch#
Whether the engine will automatically switch modes.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- PUT /space-center/engine/(id)/auto-mode-switch#
Whether the engine will automatically switch modes.
- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/engine/(id)/gimballed#
Whether the engine is gimballed.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- GET /space-center/engine/(id)/gimbal-range#
The range over which the gimbal can move, in degrees. Returns 0 if the engine is not gimballed.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (float)
- GET /space-center/engine/(id)/gimbal-locked#
Whether the engines gimbal is locked in place. Setting this attribute has no effect if the engine is not gimballed.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- PUT /space-center/engine/(id)/gimbal-locked#
Whether the engines gimbal is locked in place. Setting this attribute has no effect if the engine is not gimballed.
- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/engine/(id)/gimbal-limit#
The gimbal limiter of the engine. A value between 0 and 1. Returns 0 if the gimbal is locked.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (float)
- PUT /space-center/engine/(id)/gimbal-limit#
The gimbal limiter of the engine. A value between 0 and 1. Returns 0 if the gimbal is locked.
- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/engine/(id)/gimbal-response-speed-enabled#
Whether the gimbal moves toward its commanded deflection at
GET /space-center/engine/(id)/gimbal-response-speed. Whenfalse, the gimbal reaches its commanded deflection in one physics tick. Throws an exception if the engine is not gimballed.- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- GET /space-center/engine/(id)/gimbal-response-speed#
The response speed of the gimbal, in \(\mathrm{s^{-1}}\). Throws an exception if the engine is not gimballed.
Note
Each physics tick of length \(\Delta t\), the gimbal moves a fraction \(v \Delta t\) of the way from its deflection to the commanded deflection, where \(v\) is the response speed. The fraction is at most 1, so at high physics warp the gimbal can reach its commanded deflection in one tick. This lag only applies when
GET /space-center/engine/(id)/gimbal-response-speed-enabledistrue.- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (float)
- GET /space-center/engine/(id)/gimbal-pitch-enabled#
Whether the gimbal responds to pitch control input. Throws an exception if the engine is not gimballed.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- PUT /space-center/engine/(id)/gimbal-pitch-enabled#
Whether the gimbal responds to pitch control input. Throws an exception if the engine is not gimballed.
- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/engine/(id)/gimbal-yaw-enabled#
Whether the gimbal responds to yaw control input. Throws an exception if the engine is not gimballed.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- PUT /space-center/engine/(id)/gimbal-yaw-enabled#
Whether the gimbal responds to yaw control input. Throws an exception if the engine is not gimballed.
- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/engine/(id)/gimbal-roll-enabled#
Whether the gimbal responds to roll control input. Throws an exception if the engine is not gimballed.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- PUT /space-center/engine/(id)/gimbal-roll-enabled#
Whether the gimbal responds to roll control input. Throws an exception if the engine is not gimballed.
- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/engine/(id)/gimbal-override#
Whether the gimbal is being controlled directly, bypassing the vessel’s normal flight controls. When enabled, the gimbal deflection is set by
GET /space-center/engine/(id)/gimbal-actuationinstead of the normal control inputs. The override is automatically released if the controlling client disconnects or the vessel changes. Has no effect if the engine is not gimballed.- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- PUT /space-center/engine/(id)/gimbal-override#
Whether the gimbal is being controlled directly, bypassing the vessel’s normal flight controls. When enabled, the gimbal deflection is set by
GET /space-center/engine/(id)/gimbal-actuationinstead of the normal control inputs. The override is automatically released if the controlling client disconnects or the vessel changes. Has no effect if the engine is not gimballed.- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/engine/(id)/gimbal-actuation#
The gimbal actuation command applied when
GET /space-center/engine/(id)/gimbal-overrideis enabled, in the pitch, roll and yaw axes. Each component is a normalized control input between -1 and 1. The physical deflection is scaled byGET /space-center/engine/(id)/gimbal-rangeandGET /space-center/engine/(id)/gimbal-limit. When the gimbal is not being overridden, returns the current actuation.Note
The gimbal ignores the component for an axis it is disabled for, such as pitch when
GET /space-center/engine/(id)/gimbal-pitch-enabledisfalse.- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (tuple<double, double, double>)
- PUT /space-center/engine/(id)/gimbal-actuation#
The gimbal actuation command applied when
GET /space-center/engine/(id)/gimbal-overrideis enabled, in the pitch, roll and yaw axes. Each component is a normalized control input between -1 and 1. The physical deflection is scaled byGET /space-center/engine/(id)/gimbal-rangeandGET /space-center/engine/(id)/gimbal-limit. When the gimbal is not being overridden, returns the current actuation.Note
The gimbal ignores the component for an axis it is disabled for, such as pitch when
GET /space-center/engine/(id)/gimbal-pitch-enabledisfalse.- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (tuple<double, double, double>) – The new value.
- GET /space-center/engine/(id)/available-torque#
The available torque, in \(\mathrm{N \cdot m}\), that can be produced by this engine, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the
GET /space-center/vessel/(id)/reference-frame. Returns zero if the engine is inactive, or not gimballed.Note
The torque is zero about an axis the gimbal is disabled for, such as pitch when
GET /space-center/engine/(id)/gimbal-pitch-enabledisfalse.- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (SpaceCenter.AxisRange)
- GET /space-center/engine/(id)/can-reverse-thrust#
Whether the engine has a recognized thrust reverser. This is
truefor stock engines with a thrust reverser (such as the J-33 “Wheesley” and J-90 “Goliath” turbofan engines) and for supported mod engines. It isfalsefor engines whose reverser is not recognized, as KSP provides no standard way to detect one.Note
Recognizes the thrust reversers of Firespitter and KerbalActuators.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- GET /space-center/engine/(id)/thrust-reversed#
Whether the engine’s thrust reverser is engaged, reversing the direction of thrust. While the reverser is still moving, this reports the state it is moving to, so a read immediately after a set returns the value that was set and setting the same value again has no effect. Throws an exception if the engine does not have a thrust reverser (see
GET /space-center/engine/(id)/can-reverse-thrust).- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- PUT /space-center/engine/(id)/thrust-reversed#
Whether the engine’s thrust reverser is engaged, reversing the direction of thrust. While the reverser is still moving, this reports the state it is moving to, so a read immediately after a set returns the value that was set and setting the same value again has no effect. Throws an exception if the engine does not have a thrust reverser (see
GET /space-center/engine/(id)/can-reverse-thrust).- Parameters:
id – The identifier of the Engine object.
- Request JSON Object:
value (bool) – The new value.
- POST /space-center/engine/(id)/toggle-thrust-reversal#
Toggle the engine’s thrust reverser. Throws an exception if the engine does not have a thrust reverser (see
GET /space-center/engine/(id)/can-reverse-thrust).- Parameters:
id – The identifier of the Engine object.
- GET /space-center/engine/(id)/has-real-fuels#
Whether the engine is managed by RealFuels. The remaining properties in this section are only available when it is.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- GET /space-center/engine/(id)/ignitions#
The number of times the engine can still be ignited, or -1 if it can be ignited an unlimited number of times. Throws an exception if the engine is not managed by RealFuels (see
GET /space-center/engine/(id)/has-real-fuels).Note
Requires RealFuels.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (int32)
- GET /space-center/engine/(id)/ignition-resources#
The resources the engine consumes each time it ignites, keyed by resource name, with the amount of each that is required. The engine uses up an ignition and fails to light if they are not available. Throws an exception if the engine is not managed by RealFuels (see
GET /space-center/engine/(id)/has-real-fuels).Note
Requires RealFuels.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (dictionary<string, double>)
- GET /space-center/engine/(id)/has-ullage#
Whether the engine’s propellant is subject to ullage, so that it must be settled before the engine will run reliably. Throws an exception if the engine is not managed by RealFuels (see
GET /space-center/engine/(id)/has-real-fuels).Note
Requires RealFuels.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- GET /space-center/engine/(id)/propellant-stability#
How settled the propellant feeding the engine is, from 0 (fully unsettled) to 1 (fully settled). Acceleration along the engine’s thrust axis settles it, and coasting and rotation unsettle it. Throws an exception if the engine is not managed by RealFuels (see
GET /space-center/engine/(id)/has-real-fuels).Note
Requires RealFuels.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (double)
- GET /space-center/engine/(id)/propellant-reliability#
The probability that the propellant feeding the engine behaves normally, from 0 to 1. This is
GET /space-center/engine/(id)/propellant-stabilityscaled by the game’s ullage difficulty setting, and is the value RealFuels itself tests against when deciding whether the engine runs. Throws an exception if the engine is not managed by RealFuels (seeGET /space-center/engine/(id)/has-real-fuels).Note
Requires RealFuels.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (double)
- GET /space-center/engine/(id)/pressure-fed#
Whether the engine is fed by tank pressure rather than by a pump, and so needs to draw from a highly pressurized tank. Throws an exception if the engine is not managed by RealFuels (see
GET /space-center/engine/(id)/has-real-fuels).Note
Requires RealFuels.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
- GET /space-center/engine/(id)/has-feed-pressure#
Whether the tanks feeding the engine supply the pressure it needs. Always
truefor an engine that is not pressure fed. Throws an exception if the engine is not managed by RealFuels (seeGET /space-center/engine/(id)/has-real-fuels).Note
Requires RealFuels.
- Parameters:
id – The identifier of the Engine object.
- Response JSON Object:
value (bool)
Propellant
A propellant for an engine. Obtains by calling GET /space-center/engine/(id)/propellants.
A Propellant object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/propellant/(id)/name#
The name of the propellant.
- Parameters:
id – The identifier of the Propellant object.
- Response JSON Object:
value (string)
- GET /space-center/propellant/(id)/current-amount#
The current amount of propellant consumed in the current physics update.
- Parameters:
id – The identifier of the Propellant object.
- Response JSON Object:
value (double)
- GET /space-center/propellant/(id)/current-requirement#
The required amount of propellant for the current physics update.
- Parameters:
id – The identifier of the Propellant object.
- Response JSON Object:
value (double)
- GET /space-center/propellant/(id)/total-resource-available#
The total amount of the underlying resource currently reachable given resource flow rules.
- Parameters:
id – The identifier of the Propellant object.
- Response JSON Object:
value (double)
- GET /space-center/propellant/(id)/total-resource-capacity#
The total vehicle capacity for the underlying propellant resource, restricted by resource flow rules.
- Parameters:
id – The identifier of the Propellant object.
- Response JSON Object:
value (double)
- GET /space-center/propellant/(id)/ignore-for-isp#
If this propellant should be ignored when calculating required mass flow given specific impulse.
- Parameters:
id – The identifier of the Propellant object.
- Response JSON Object:
value (bool)
- GET /space-center/propellant/(id)/ignore-for-thrust-curve#
If this propellant should be ignored for thrust curve calculations.
- Parameters:
id – The identifier of the Propellant object.
- Response JSON Object:
value (bool)
- GET /space-center/propellant/(id)/draw-stack-gauge#
If this propellant has a stack gauge or not.
- Parameters:
id – The identifier of the Propellant object.
- Response JSON Object:
value (bool)
- GET /space-center/propellant/(id)/is-deprived#
If this propellant is deprived.
- Parameters:
id – The identifier of the Propellant object.
- Response JSON Object:
value (bool)
- GET /space-center/propellant/(id)/ratio#
The propellant ratio.
- Parameters:
id – The identifier of the Propellant object.
- Response JSON Object:
value (float)
Experiment#
Experiment
Obtained by calling GET /space-center/part/(id)/experiment.
Note
Includes the experiments of DMagic’s DMModuleScienceAnimateGeneric.
A Experiment object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/experiment/(id)/part#
The part object for this experiment.
- Parameters:
id – The identifier of the Experiment object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/experiment/(id)/name#
Internal name of the experiment, as used in part cfg files.
- Parameters:
id – The identifier of the Experiment object.
- Response JSON Object:
value (string)
- GET /space-center/experiment/(id)/title#
Title of the experiment, as shown on the in-game UI.
- Parameters:
id – The identifier of the Experiment object.
- Response JSON Object:
value (string)
- POST /space-center/experiment/(id)/run#
Run the experiment.
- Parameters:
id – The identifier of the Experiment object.
- POST /space-center/experiment/(id)/transmit#
Transmit all experimental data contained by this part.
- Parameters:
id – The identifier of the Experiment object.
- POST /space-center/experiment/(id)/dump#
Dump the experimental data contained by the experiment.
- Parameters:
id – The identifier of the Experiment object.
- POST /space-center/experiment/(id)/reset#
Reset the experiment.
- Parameters:
id – The identifier of the Experiment object.
- GET /space-center/experiment/(id)/deployed#
Whether the experiment has been deployed.
- Parameters:
id – The identifier of the Experiment object.
- Response JSON Object:
value (bool)
- GET /space-center/experiment/(id)/rerunnable#
Whether the experiment can be re-run.
- Parameters:
id – The identifier of the Experiment object.
- Response JSON Object:
value (bool)
- GET /space-center/experiment/(id)/inoperable#
Whether the experiment is inoperable.
- Parameters:
id – The identifier of the Experiment object.
- Response JSON Object:
value (bool)
- GET /space-center/experiment/(id)/has-data#
Whether the experiment contains data.
- Parameters:
id – The identifier of the Experiment object.
- Response JSON Object:
value (bool)
- GET /space-center/experiment/(id)/data#
The data contained in this experiment.
- Parameters:
id – The identifier of the Experiment object.
- Response JSON Object:
value (list<SpaceCenter.ScienceData>)
- GET /space-center/experiment/(id)/biome#
The name of the biome the experiment is currently in.
- Parameters:
id – The identifier of the Experiment object.
- Response JSON Object:
value (string)
- GET /space-center/experiment/(id)/available#
Determines if the experiment is available given the current conditions.
- Parameters:
id – The identifier of the Experiment object.
- Response JSON Object:
value (bool)
- GET /space-center/experiment/(id)/science-subject#
Containing information on the corresponding specific science result for the current conditions. Returns
nullif the experiment is unavailable.- Parameters:
id – The identifier of the Experiment object.
- Response JSON Object:
value (SpaceCenter.ScienceSubject?)
ScienceData
Obtained by calling GET /space-center/experiment/(id)/data.
Passed and returned as an object with these fields:
data_amount(float)Data amount.
science_value(float)Science value.
transmit_value(float)Transmit value.
ScienceSubject
Obtained by calling GET /space-center/experiment/(id)/science-subject.
Passed and returned as an object with these fields:
id(string)The identifier of the subject, e.g.
crewReport@KerbinSrfLandedLaunchPad.title(string)The title of the subject, as shown in the science archives.
is_complete(bool)Whether the subject has been fully researched. This is true once the science banked for the subject reaches the science cap. As the banked science (see
science) is only updated after transmission/recovery, this reflects fully mining the subject over repeated experiments, not whether a single run has produced data. To check whether a run has produced data, and how valuable it is, useGET /space-center/experiment/(id)/has-dataandtransmit_value.science(float)Amount of science already earned from this subject, not updated until after transmission/recovery.
science_cap(float)Total science allowable for this subject.
data_scale(float)Multiply science value by this to determine data amount in mits.
subject_value(float)Multiplier for specific Celestial Body/Experiment Situation combination.
scientific_value(float)Diminishing value multiplier for decreasing the science value returned from repeated experiments.
Fairing#
Fairing
A fairing. Obtained by calling GET /space-center/part/(id)/fairing.
Note
Includes the fairings of ProceduralFairings.
A Fairing object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/fairing/(id)/part#
The part object for this fairing.
- Parameters:
id – The identifier of the Fairing object.
- Response JSON Object:
value (SpaceCenter.Part)
Intake#
Intake
An air intake. Obtained by calling GET /space-center/part/(id)/intake.
A Intake object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/intake/(id)/part#
The part object for this intake.
- Parameters:
id – The identifier of the Intake object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/intake/(id)/open#
Whether the intake is open.
- Parameters:
id – The identifier of the Intake object.
- Response JSON Object:
value (bool)
- PUT /space-center/intake/(id)/open#
Whether the intake is open.
- Parameters:
id – The identifier of the Intake object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/intake/(id)/speed#
Speed of the flow into the intake, in \(\mathrm{m/s}\).
- Parameters:
id – The identifier of the Intake object.
- Response JSON Object:
value (float)
Leg#
Leg
A landing leg. Obtained by calling GET /space-center/part/(id)/leg.
A Leg object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/leg/(id)/part#
The part object for this landing leg.
- Parameters:
id – The identifier of the Leg object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/leg/(id)/state#
The current state of the landing leg.
- Parameters:
id – The identifier of the Leg object.
- Response JSON Object:
value (SpaceCenter.DeployableState)
- GET /space-center/leg/(id)/deployable#
Whether the leg is deployable.
- Parameters:
id – The identifier of the Leg object.
- Response JSON Object:
value (bool)
- GET /space-center/leg/(id)/deployed#
Whether the landing leg is deployed.
Note
Fixed landing legs are always deployed. Throws KRPC.InvalidOperationException if set on a fixed landing leg.
- Parameters:
id – The identifier of the Leg object.
- Response JSON Object:
value (bool)
- PUT /space-center/leg/(id)/deployed#
Whether the landing leg is deployed.
Note
Fixed landing legs are always deployed. Throws KRPC.InvalidOperationException if set on a fixed landing leg.
- Parameters:
id – The identifier of the Leg object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/leg/(id)/is-grounded#
Returns whether the leg is touching the ground.
- Parameters:
id – The identifier of the Leg object.
- Response JSON Object:
value (bool)
- GET /space-center/leg/(id)/load#
The force pressing the leg’s foot into the ground, in \(\mathrm{kN}\).
Note
The game raises the load of a grounded leg to at least 10 kN.
GET /space-center/leg/(id)/impact-toleranceapplies to the rise in this value.- Parameters:
id – The identifier of the Leg object.
- Response JSON Object:
value (float)
- POST /space-center/leg/(id)/contact-position#
The position of the bottom of the leg’s foot, in the given reference frame. While the leg is grounded, this is where it touches the ground.
- Parameters:
id – The identifier of the Leg object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned position vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – The position as a vector.
- GET /space-center/leg/(id)/suspension-spring-strength#
Suspension spring strength, as set in the editor. Throws an exception if the leg has no suspension.
- Parameters:
id – The identifier of the Leg object.
- Response JSON Object:
value (float)
- GET /space-center/leg/(id)/suspension-damper-strength#
Suspension damper strength, as set in the editor. Throws an exception if the leg has no suspension.
- Parameters:
id – The identifier of the Leg object.
- Response JSON Object:
value (float)
- GET /space-center/leg/(id)/suspension-spring#
The spring constant of the suspension, in \(\mathrm{kN/m}\), or
nullwhile the leg is not grounded.Note
The game updates it while the leg is grounded, from
GET /space-center/leg/(id)/suspension-spring-strength, the vessel’s mass, the leg’s compression and the local gravity.- Parameters:
id – The identifier of the Leg object.
- Response JSON Object:
value (float?)
- GET /space-center/leg/(id)/suspension-damper#
The damping constant of the suspension, in \(\mathrm{kN \cdot s/m}\), or
nullwhile the leg is not grounded.Note
The game updates it while the leg is grounded, from
GET /space-center/leg/(id)/suspension-damper-strengthandGET /space-center/leg/(id)/suspension-spring.- Parameters:
id – The identifier of the Leg object.
- Response JSON Object:
value (float?)
- GET /space-center/leg/(id)/suspension-travel#
The travel of the suspension, in meters.
- Parameters:
id – The identifier of the Leg object.
- Response JSON Object:
value (float)
- GET /space-center/leg/(id)/impact-tolerance#
The rise in
GET /space-center/leg/(id)/loadover one physics tick that breaks the leg, in \(\mathrm{kN}\). Throws an exception if the leg is not breakable.Note
The game scales the rise by the local gravity divided by standard gravity before comparing it with this tolerance.
- Parameters:
id – The identifier of the Leg object.
- Response JSON Object:
value (float)
- GET /space-center/leg/(id)/explode-multiplier#
The multiple of
GET /space-center/leg/(id)/impact-tolerancethat destroys the leg, in place of breaking it. Throws an exception if the leg is not breakable.- Parameters:
id – The identifier of the Leg object.
- Response JSON Object:
value (float)
Launch Clamp#
LaunchClamp
A launch clamp. Obtained by calling GET /space-center/part/(id)/launch-clamp.
A LaunchClamp object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/launch-clamp/(id)/part#
The part object for this launch clamp.
- Parameters:
id – The identifier of the LaunchClamp object.
- Response JSON Object:
value (SpaceCenter.Part)
- POST /space-center/launch-clamp/(id)/release#
Releases the docking clamp. Has no effect if the clamp has already been released.
- Parameters:
id – The identifier of the LaunchClamp object.
Light#
Light
A light. Obtained by calling GET /space-center/part/(id)/light.
A Light object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/light/(id)/part#
The part object for this light.
- Parameters:
id – The identifier of the Light object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/light/(id)/active#
Whether the light is switched on.
- Parameters:
id – The identifier of the Light object.
- Response JSON Object:
value (bool)
- PUT /space-center/light/(id)/active#
Whether the light is switched on.
- Parameters:
id – The identifier of the Light object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/light/(id)/color#
The color of the light.
- Parameters:
id – The identifier of the Light object.
- Response JSON Object:
value (StdLib.ColorRGB)
- PUT /space-center/light/(id)/color#
The color of the light.
- Parameters:
id – The identifier of the Light object.
- Request JSON Object:
value (StdLib.ColorRGB) – The new value.
- GET /space-center/light/(id)/blink#
Whether blinking is enabled.
- Parameters:
id – The identifier of the Light object.
- Response JSON Object:
value (bool)
- PUT /space-center/light/(id)/blink#
Whether blinking is enabled.
- Parameters:
id – The identifier of the Light object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/light/(id)/blink-rate#
The blink rate of the light.
- Parameters:
id – The identifier of the Light object.
- Response JSON Object:
value (float)
Parachute#
Parachute
A parachute. Obtained by calling GET /space-center/part/(id)/parachute.
Note
Includes the parachutes of RealChute.
A Parachute object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/parachute/(id)/part#
The part object for this parachute.
- Parameters:
id – The identifier of the Parachute object.
- Response JSON Object:
value (SpaceCenter.Part)
- POST /space-center/parachute/(id)/deploy#
Deploys the parachute. This has no effect if the parachute has already been deployed.
- Parameters:
id – The identifier of the Parachute object.
- GET /space-center/parachute/(id)/deployed#
Whether the parachute has been deployed.
- Parameters:
id – The identifier of the Parachute object.
- Response JSON Object:
value (bool)
- POST /space-center/parachute/(id)/arm#
Deploys the parachute. This has no effect if the parachute has already been armed or deployed.
- Parameters:
id – The identifier of the Parachute object.
- GET /space-center/parachute/(id)/armed#
Whether the parachute has been armed or deployed.
- Parameters:
id – The identifier of the Parachute object.
- Response JSON Object:
value (bool)
- POST /space-center/parachute/(id)/cut#
Cuts the parachute.
- Parameters:
id – The identifier of the Parachute object.
- GET /space-center/parachute/(id)/state#
The current state of the parachute.
- Parameters:
id – The identifier of the Parachute object.
- Response JSON Object:
value (SpaceCenter.ParachuteState)
- GET /space-center/parachute/(id)/deploy-altitude#
The altitude at which the parachute will full deploy, in meters. Only applicable to stock parachutes.
- Parameters:
id – The identifier of the Parachute object.
- Response JSON Object:
value (float)
- PUT /space-center/parachute/(id)/deploy-altitude#
The altitude at which the parachute will full deploy, in meters. Only applicable to stock parachutes.
- Parameters:
id – The identifier of the Parachute object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/parachute/(id)/deploy-min-pressure#
The minimum pressure at which the parachute will semi-deploy, in atmospheres. Only applicable to stock parachutes.
- Parameters:
id – The identifier of the Parachute object.
- Response JSON Object:
value (float)
- PUT /space-center/parachute/(id)/deploy-min-pressure#
The minimum pressure at which the parachute will semi-deploy, in atmospheres. Only applicable to stock parachutes.
- Parameters:
id – The identifier of the Parachute object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/parachute/(id)/safe-state#
Whether it is currently safe to deploy the parachute, given the vessel’s flight conditions. Computed by KSP from the current airspeed, pressure and temperature. Only applicable to stock parachutes. Note that KSP reports
"unsafe"for the first second after the vessel unpacks, before its thermal data is valid.- Parameters:
id – The identifier of the Parachute object.
- Response JSON Object:
value (SpaceCenter.ParachuteSafeState)
ParachuteState
The state of a parachute. See GET /space-center/parachute/(id)/state.
Passed and returned as the name of one of its values:
"stowed"The parachute is safely tucked away inside its housing.
"armed"The parachute is armed for deployment.
"semi_deployed"The parachute has been deployed and is providing some drag, but is not fully deployed yet. (Stock parachutes only)
"deployed"The parachute is fully deployed.
"cut"The parachute has been cut.
ParachuteSafeState
The safety state of deploying a parachute. See GET /space-center/parachute/(id)/safe-state.
Passed and returned as the name of one of its values:
"safe"The parachute is safe to deploy.
"risky"Deploying the parachute is risky, and it may break off.
"unsafe"The parachute is unsafe to deploy, and will break off.
"none"The safety state is not available, because the vessel is not in an atmosphere or the parachute has already been deployed or cut.
Radiator#
Radiator
A radiator. Obtained by calling GET /space-center/part/(id)/radiator.
A Radiator object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/radiator/(id)/part#
The part object for this radiator.
- Parameters:
id – The identifier of the Radiator object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/radiator/(id)/deployable#
Whether the radiator is deployable.
- Parameters:
id – The identifier of the Radiator object.
- Response JSON Object:
value (bool)
- GET /space-center/radiator/(id)/deployed#
For a deployable radiator,
trueif the radiator is extended. If the radiator is not deployable, this is alwaystrue.- Parameters:
id – The identifier of the Radiator object.
- Response JSON Object:
value (bool)
Resource Converter#
ResourceConverter
A resource converter. Obtained by calling GET /space-center/part/(id)/resource-converter.
A ResourceConverter object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/resource-converter/(id)/part#
The part object for this converter.
- Parameters:
id – The identifier of the ResourceConverter object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/resource-converter/(id)/count#
The number of converters in the part.
- Parameters:
id – The identifier of the ResourceConverter object.
- Response JSON Object:
value (int32)
- POST /space-center/resource-converter/(id)/name#
The name of the specified converter.
- Parameters:
id – The identifier of the ResourceConverter object.
- Request JSON Object:
index (int32) – Index of the converter.
- Response JSON Object:
value (string)
- POST /space-center/resource-converter/(id)/active#
True if the specified converter is active.
- Parameters:
id – The identifier of the ResourceConverter object.
- Request JSON Object:
index (int32) – Index of the converter.
- Response JSON Object:
value (bool)
- POST /space-center/resource-converter/(id)/start#
Start the specified converter.
- Parameters:
id – The identifier of the ResourceConverter object.
- Request JSON Object:
index (int32) – Index of the converter.
- POST /space-center/resource-converter/(id)/stop#
Stop the specified converter.
- Parameters:
id – The identifier of the ResourceConverter object.
- Request JSON Object:
index (int32) – Index of the converter.
- POST /space-center/resource-converter/(id)/state#
The state of the specified converter.
- Parameters:
id – The identifier of the ResourceConverter object.
- Request JSON Object:
index (int32) – Index of the converter.
- Response JSON Object:
value (SpaceCenter.ResourceConverterState)
- POST /space-center/resource-converter/(id)/status-info#
Status information for the specified converter. This is the full status message shown in the in-game UI.
- Parameters:
id – The identifier of the ResourceConverter object.
- Request JSON Object:
index (int32) – Index of the converter.
- Response JSON Object:
value (string)
- POST /space-center/resource-converter/(id)/inputs#
List of the names of resources consumed by the specified converter.
- Parameters:
id – The identifier of the ResourceConverter object.
- Request JSON Object:
index (int32) – Index of the converter.
- Response JSON Object:
value (list<string>)
- POST /space-center/resource-converter/(id)/outputs#
List of the names of resources produced by the specified converter.
- Parameters:
id – The identifier of the ResourceConverter object.
- Request JSON Object:
index (int32) – Index of the converter.
- Response JSON Object:
value (list<string>)
- GET /space-center/resource-converter/(id)/optimum-core-temperature#
The core temperature at which the converter will operate with peak efficiency, in Kelvin.
- Parameters:
id – The identifier of the ResourceConverter object.
- Response JSON Object:
value (float)
- GET /space-center/resource-converter/(id)/core-temperature#
The core temperature of the converter, in Kelvin.
- Parameters:
id – The identifier of the ResourceConverter object.
- Response JSON Object:
value (float)
- GET /space-center/resource-converter/(id)/thermal-efficiency#
The thermal efficiency of the converter, as a percentage of its maximum.
- Parameters:
id – The identifier of the ResourceConverter object.
- Response JSON Object:
value (float)
ResourceConverterState
The state of a resource converter. See POST /space-center/resource-converter/(id)/state.
Passed and returned as the name of one of its values:
"running"Converter is running.
"idle"Converter is idle.
"missing_resource"Converter is missing a required resource.
"storage_full"No available storage for output resource.
"capacity"At preset resource capacity.
"unknown"Unknown state. Possible with modified resource converters. In this case, check
POST /space-center/resource-converter/(id)/status-infofor more information.
Resource Harvester#
ResourceHarvester
A resource harvester (drill). Obtained by calling GET /space-center/part/(id)/resource-harvester.
A ResourceHarvester object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/resource-harvester/(id)/part#
The part object for this harvester.
- Parameters:
id – The identifier of the ResourceHarvester object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/resource-harvester/(id)/state#
The deployment state of the harvester. Whether it is drilling is reported separately by
GET /space-center/resource-harvester/(id)/active.Note
A harvester is never
"broken", as the game does not track damage for them.- Parameters:
id – The identifier of the ResourceHarvester object.
- Response JSON Object:
value (SpaceCenter.DeployableState)
- GET /space-center/resource-harvester/(id)/deployed#
Whether the harvester is deployed.
- Parameters:
id – The identifier of the ResourceHarvester object.
- Response JSON Object:
value (bool)
- PUT /space-center/resource-harvester/(id)/deployed#
Whether the harvester is deployed.
- Parameters:
id – The identifier of the ResourceHarvester object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/resource-harvester/(id)/active#
Whether the harvester is actively drilling.
Note
A value set while the harvester is deploying is applied when the deploy completes, so it can be set immediately after setting
GET /space-center/resource-harvester/(id)/deployedwithout waiting for the deploy animation. Setting it has no effect while the harvester is retracted or retracting.- Parameters:
id – The identifier of the ResourceHarvester object.
- Response JSON Object:
value (bool)
- PUT /space-center/resource-harvester/(id)/active#
Whether the harvester is actively drilling.
Note
A value set while the harvester is deploying is applied when the deploy completes, so it can be set immediately after setting
GET /space-center/resource-harvester/(id)/deployedwithout waiting for the deploy animation. Setting it has no effect while the harvester is retracted or retracting.- Parameters:
id – The identifier of the ResourceHarvester object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/resource-harvester/(id)/extraction-rate#
The rate at which the drill is extracting ore, in \(\mathrm{units/s}\).
- Parameters:
id – The identifier of the ResourceHarvester object.
- Response JSON Object:
value (float)
- GET /space-center/resource-harvester/(id)/thermal-efficiency#
The thermal efficiency of the drill, as a percentage of its maximum.
- Parameters:
id – The identifier of the ResourceHarvester object.
- Response JSON Object:
value (float)
- GET /space-center/resource-harvester/(id)/core-temperature#
The core temperature of the drill, in Kelvin.
- Parameters:
id – The identifier of the ResourceHarvester object.
- Response JSON Object:
value (float)
- GET /space-center/resource-harvester/(id)/optimum-core-temperature#
The core temperature at which the drill will operate with peak efficiency, in Kelvin.
- Parameters:
id – The identifier of the ResourceHarvester object.
- Response JSON Object:
value (float)
Reaction Wheel#
ReactionWheel
A reaction wheel. Obtained by calling GET /space-center/part/(id)/reaction-wheel.
A ReactionWheel object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/reaction-wheel/(id)/part#
The part object for this reaction wheel.
- Parameters:
id – The identifier of the ReactionWheel object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/reaction-wheel/(id)/active#
Whether the reaction wheel is active.
- Parameters:
id – The identifier of the ReactionWheel object.
- Response JSON Object:
value (bool)
- PUT /space-center/reaction-wheel/(id)/active#
Whether the reaction wheel is active.
- Parameters:
id – The identifier of the ReactionWheel object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/reaction-wheel/(id)/broken#
Whether the reaction wheel is broken.
- Parameters:
id – The identifier of the ReactionWheel object.
- Response JSON Object:
value (bool)
- GET /space-center/reaction-wheel/(id)/available-torque#
The available torque, in \(\mathrm{N \cdot m}\), that can be produced by this reaction wheel, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the
GET /space-center/vessel/(id)/reference-frame. Returns zero if the reaction wheel is inactive or broken.- Parameters:
id – The identifier of the ReactionWheel object.
- Response JSON Object:
value (SpaceCenter.AxisRange)
- GET /space-center/reaction-wheel/(id)/max-torque#
The maximum torque, in \(\mathrm{N \cdot m}\), that can be produced by this reaction wheel, when it is active, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the
GET /space-center/vessel/(id)/reference-frame.- Parameters:
id – The identifier of the ReactionWheel object.
- Response JSON Object:
value (SpaceCenter.AxisRange)
- GET /space-center/reaction-wheel/(id)/authority-limiter#
The authority limiter for the reaction wheel, as a percentage of maximum torque. A value between 0 and 1.
- Parameters:
id – The identifier of the ReactionWheel object.
- Response JSON Object:
value (float)
- PUT /space-center/reaction-wheel/(id)/authority-limiter#
The authority limiter for the reaction wheel, as a percentage of maximum torque. A value between 0 and 1.
- Parameters:
id – The identifier of the ReactionWheel object.
- Request JSON Object:
value (float) – The new value.
Resource Drain#
ResourceDrain
A resource drain. Obtained by calling GET /space-center/part/(id)/resource-drain.
A ResourceDrain object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/resource-drain/(id)/part#
The part object for this resource drain.
- Parameters:
id – The identifier of the ResourceDrain object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/resource-drain/(id)/available-resources#
List of available resources.
- Parameters:
id – The identifier of the ResourceDrain object.
- Response JSON Object:
value (list<SpaceCenter.Resource>)
- POST /space-center/resource-drain/(id)/set-resource#
Whether the given resource should be drained.
- Parameters:
id – The identifier of the ResourceDrain object.
- Request JSON Object:
resource (SpaceCenter.Resource)
enabled (bool)
- POST /space-center/resource-drain/(id)/check-resource#
Whether the provided resource is enabled for draining.
- Parameters:
id – The identifier of the ResourceDrain object.
- Request JSON Object:
resource (SpaceCenter.Resource)
- Response JSON Object:
value (bool)
- GET /space-center/resource-drain/(id)/drain-mode#
The drain mode.
- Parameters:
id – The identifier of the ResourceDrain object.
- Response JSON Object:
value (SpaceCenter.DrainMode)
- PUT /space-center/resource-drain/(id)/drain-mode#
The drain mode.
- Parameters:
id – The identifier of the ResourceDrain object.
- Request JSON Object:
value (SpaceCenter.DrainMode) – The new value.
- GET /space-center/resource-drain/(id)/min-rate#
Minimum possible drain rate
- Parameters:
id – The identifier of the ResourceDrain object.
- Response JSON Object:
value (float)
- GET /space-center/resource-drain/(id)/max-rate#
Maximum possible drain rate.
- Parameters:
id – The identifier of the ResourceDrain object.
- Response JSON Object:
value (float)
- GET /space-center/resource-drain/(id)/rate#
Current drain rate.
- Parameters:
id – The identifier of the ResourceDrain object.
- Response JSON Object:
value (float)
- PUT /space-center/resource-drain/(id)/rate#
Current drain rate.
- Parameters:
id – The identifier of the ResourceDrain object.
- Request JSON Object:
value (float) – The new value.
- POST /space-center/resource-drain/(id)/start#
Activates resource draining for all enabled parts.
- Parameters:
id – The identifier of the ResourceDrain object.
- POST /space-center/resource-drain/(id)/stop#
Turns off resource draining.
- Parameters:
id – The identifier of the ResourceDrain object.
DrainMode
Resource drain mode.
See GET /space-center/resource-drain/(id)/drain-mode.
Passed and returned as the name of one of its values:
"part"Drains from the parent part.
"vessel"Drains from all available parts.
Robotic Controller#
RoboticController
A robotic controller. Obtained by calling GET /space-center/part/(id)/robotic-controller.
A RoboticController object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/robotic-controller/(id)/part#
The part object for this controller.
- Parameters:
id – The identifier of the RoboticController object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/robotic-controller/(id)/enabled#
Whether the controller is enabled.
- Parameters:
id – The identifier of the RoboticController object.
- Response JSON Object:
value (bool)
- PUT /space-center/robotic-controller/(id)/enabled#
Whether the controller is enabled.
- Parameters:
id – The identifier of the RoboticController object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/robotic-controller/(id)/playing#
Whether the controller’s sequence is currently playing.
- Parameters:
id – The identifier of the RoboticController object.
- Response JSON Object:
value (bool)
- GET /space-center/robotic-controller/(id)/position#
The current position along the sequence, in seconds.
- Parameters:
id – The identifier of the RoboticController object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-controller/(id)/position#
The current position along the sequence, in seconds.
- Parameters:
id – The identifier of the RoboticController object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-controller/(id)/length#
The length of the sequence, in seconds.
- Parameters:
id – The identifier of the RoboticController object.
- Response JSON Object:
value (float)
- GET /space-center/robotic-controller/(id)/play-speed#
The speed at which the sequence is played back, as a multiple of normal speed.
- Parameters:
id – The identifier of the RoboticController object.
- Response JSON Object:
value (float)
- POST /space-center/robotic-controller/(id)/play#
Start playing the controller’s sequence.
- Parameters:
id – The identifier of the RoboticController object.
- POST /space-center/robotic-controller/(id)/stop#
Stop playing the controller’s sequence.
- Parameters:
id – The identifier of the RoboticController object.
- POST /space-center/robotic-controller/(id)/has-part#
Whether the controller has a part.
- Parameters:
id – The identifier of the RoboticController object.
- Request JSON Object:
part (SpaceCenter.Part)
- Response JSON Object:
value (bool)
- POST /space-center/robotic-controller/(id)/axes#
The axes for the controller.
- Parameters:
id – The identifier of the RoboticController object.
- Response JSON Object:
value (list<SpaceCenter.RoboticAxis>)
- POST /space-center/robotic-controller/(id)/add-axis#
Add an axis to the controller.
- Parameters:
id – The identifier of the RoboticController object.
- Request JSON Object:
module (SpaceCenter.Module) – The part module that the axis belongs to.
field_name (string) – The name of the axis field, as returned by
POST /space-center/robotic-controller/(id)/axes.
- Response JSON Object:
value (bool) – Returns
trueif the axis is added successfully.
- POST /space-center/robotic-controller/(id)/add-key-frame#
Add key frame value for controller axis.
- Parameters:
id – The identifier of the RoboticController object.
- Request JSON Object:
module (SpaceCenter.Module) – The part module that the axis belongs to.
field_name (string) – The name of the axis field, as returned by
POST /space-center/robotic-controller/(id)/axes.time (float) – The time of the key frame.
value (float) – The value of the key frame.
- Response JSON Object:
value (bool) – Returns
trueif the key frame is added successfully.
- POST /space-center/robotic-controller/(id)/clear-axis#
Clear axis.
- Parameters:
id – The identifier of the RoboticController object.
- Request JSON Object:
module (SpaceCenter.Module) – The part module that the axis belongs to.
field_name (string) – The name of the axis field, as returned by
POST /space-center/robotic-controller/(id)/axes.
- Response JSON Object:
value (bool) – Returns
trueif the axis is cleared successfully.
RoboticAxis
An axis of a robotic controller.
Passed and returned as an object with these fields:
module(SpaceCenter.Module)The part module the axis belongs to.
field_name(string)The name of the field the axis controls.
Robotic Hinge#
RoboticHinge
A robotic hinge. Obtained by calling GET /space-center/part/(id)/robotic-hinge.
A RoboticHinge object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/robotic-hinge/(id)/part#
The part object for this robotic hinge.
- Parameters:
id – The identifier of the RoboticHinge object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/robotic-hinge/(id)/target-angle#
Target angle.
- Parameters:
id – The identifier of the RoboticHinge object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-hinge/(id)/target-angle#
Target angle.
- Parameters:
id – The identifier of the RoboticHinge object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-hinge/(id)/current-angle#
Current angle.
- Parameters:
id – The identifier of the RoboticHinge object.
- Response JSON Object:
value (float)
- GET /space-center/robotic-hinge/(id)/min-angle#
The minimum angle the hinge can move to, in degrees.
- Parameters:
id – The identifier of the RoboticHinge object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-hinge/(id)/min-angle#
The minimum angle the hinge can move to, in degrees.
- Parameters:
id – The identifier of the RoboticHinge object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-hinge/(id)/max-angle#
The maximum angle the hinge can move to, in degrees.
- Parameters:
id – The identifier of the RoboticHinge object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-hinge/(id)/max-angle#
The maximum angle the hinge can move to, in degrees.
- Parameters:
id – The identifier of the RoboticHinge object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-hinge/(id)/rate#
Target movement rate in \(\mathrm{{}^{\circ}/s}\).
- Parameters:
id – The identifier of the RoboticHinge object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-hinge/(id)/rate#
Target movement rate in \(\mathrm{{}^{\circ}/s}\).
- Parameters:
id – The identifier of the RoboticHinge object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-hinge/(id)/damping#
Damping percentage.
- Parameters:
id – The identifier of the RoboticHinge object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-hinge/(id)/damping#
Damping percentage.
- Parameters:
id – The identifier of the RoboticHinge object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-hinge/(id)/locked#
Lock movement.
- Parameters:
id – The identifier of the RoboticHinge object.
- Response JSON Object:
value (bool)
- PUT /space-center/robotic-hinge/(id)/locked#
Lock movement.
- Parameters:
id – The identifier of the RoboticHinge object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/robotic-hinge/(id)/motor-engaged#
Whether the motor is engaged.
- Parameters:
id – The identifier of the RoboticHinge object.
- Response JSON Object:
value (bool)
- PUT /space-center/robotic-hinge/(id)/motor-engaged#
Whether the motor is engaged.
- Parameters:
id – The identifier of the RoboticHinge object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/robotic-hinge/(id)/is-moving#
Whether the servo is currently moving.
- Parameters:
id – The identifier of the RoboticHinge object.
- Response JSON Object:
value (bool)
- POST /space-center/robotic-hinge/(id)/move-home#
Move hinge to its built position.
- Parameters:
id – The identifier of the RoboticHinge object.
Robotic Piston#
RoboticPiston
A robotic piston part. Obtained by calling GET /space-center/part/(id)/robotic-piston.
A RoboticPiston object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/robotic-piston/(id)/part#
The part object for this robotic piston.
- Parameters:
id – The identifier of the RoboticPiston object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/robotic-piston/(id)/target-extension#
Target extension of the piston.
- Parameters:
id – The identifier of the RoboticPiston object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-piston/(id)/target-extension#
Target extension of the piston.
- Parameters:
id – The identifier of the RoboticPiston object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-piston/(id)/current-extension#
Current extension of the piston.
- Parameters:
id – The identifier of the RoboticPiston object.
- Response JSON Object:
value (float)
- GET /space-center/robotic-piston/(id)/min-extension#
The minimum extension of the piston, in meters.
- Parameters:
id – The identifier of the RoboticPiston object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-piston/(id)/min-extension#
The minimum extension of the piston, in meters.
- Parameters:
id – The identifier of the RoboticPiston object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-piston/(id)/max-extension#
The maximum extension of the piston, in meters.
- Parameters:
id – The identifier of the RoboticPiston object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-piston/(id)/max-extension#
The maximum extension of the piston, in meters.
- Parameters:
id – The identifier of the RoboticPiston object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-piston/(id)/rate#
Target movement rate in \(\mathrm{m/s}\).
- Parameters:
id – The identifier of the RoboticPiston object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-piston/(id)/rate#
Target movement rate in \(\mathrm{m/s}\).
- Parameters:
id – The identifier of the RoboticPiston object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-piston/(id)/damping#
Damping percentage.
- Parameters:
id – The identifier of the RoboticPiston object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-piston/(id)/damping#
Damping percentage.
- Parameters:
id – The identifier of the RoboticPiston object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-piston/(id)/locked#
Lock movement.
- Parameters:
id – The identifier of the RoboticPiston object.
- Response JSON Object:
value (bool)
- PUT /space-center/robotic-piston/(id)/locked#
Lock movement.
- Parameters:
id – The identifier of the RoboticPiston object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/robotic-piston/(id)/motor-engaged#
Whether the motor is engaged.
- Parameters:
id – The identifier of the RoboticPiston object.
- Response JSON Object:
value (bool)
- PUT /space-center/robotic-piston/(id)/motor-engaged#
Whether the motor is engaged.
- Parameters:
id – The identifier of the RoboticPiston object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/robotic-piston/(id)/is-moving#
Whether the servo is currently moving.
- Parameters:
id – The identifier of the RoboticPiston object.
- Response JSON Object:
value (bool)
- POST /space-center/robotic-piston/(id)/move-home#
Move piston to its built position.
- Parameters:
id – The identifier of the RoboticPiston object.
Robotic Rotation#
RoboticRotation
A robotic rotation servo. Obtained by calling GET /space-center/part/(id)/robotic-rotation.
A RoboticRotation object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/robotic-rotation/(id)/part#
The part object for this robotic rotation servo.
- Parameters:
id – The identifier of the RoboticRotation object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/robotic-rotation/(id)/target-angle#
Target angle.
- Parameters:
id – The identifier of the RoboticRotation object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-rotation/(id)/target-angle#
Target angle.
- Parameters:
id – The identifier of the RoboticRotation object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-rotation/(id)/current-angle#
Current angle.
- Parameters:
id – The identifier of the RoboticRotation object.
- Response JSON Object:
value (float)
- GET /space-center/robotic-rotation/(id)/min-angle#
The minimum angle the servo can rotate to, in degrees.
- Parameters:
id – The identifier of the RoboticRotation object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-rotation/(id)/min-angle#
The minimum angle the servo can rotate to, in degrees.
- Parameters:
id – The identifier of the RoboticRotation object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-rotation/(id)/max-angle#
The maximum angle the servo can rotate to, in degrees.
- Parameters:
id – The identifier of the RoboticRotation object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-rotation/(id)/max-angle#
The maximum angle the servo can rotate to, in degrees.
- Parameters:
id – The identifier of the RoboticRotation object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-rotation/(id)/allow-full-rotation#
Whether the servo is allowed to rotate freely through a full revolution, ignoring the angle limits.
- Parameters:
id – The identifier of the RoboticRotation object.
- Response JSON Object:
value (bool)
- PUT /space-center/robotic-rotation/(id)/allow-full-rotation#
Whether the servo is allowed to rotate freely through a full revolution, ignoring the angle limits.
- Parameters:
id – The identifier of the RoboticRotation object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/robotic-rotation/(id)/rate#
Target movement rate in \(\mathrm{{}^{\circ}/s}\).
- Parameters:
id – The identifier of the RoboticRotation object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-rotation/(id)/rate#
Target movement rate in \(\mathrm{{}^{\circ}/s}\).
- Parameters:
id – The identifier of the RoboticRotation object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-rotation/(id)/damping#
Damping percentage.
- Parameters:
id – The identifier of the RoboticRotation object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-rotation/(id)/damping#
Damping percentage.
- Parameters:
id – The identifier of the RoboticRotation object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-rotation/(id)/locked#
Lock Movement
- Parameters:
id – The identifier of the RoboticRotation object.
- Response JSON Object:
value (bool)
- PUT /space-center/robotic-rotation/(id)/locked#
Lock Movement
- Parameters:
id – The identifier of the RoboticRotation object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/robotic-rotation/(id)/motor-engaged#
Whether the motor is engaged.
- Parameters:
id – The identifier of the RoboticRotation object.
- Response JSON Object:
value (bool)
- PUT /space-center/robotic-rotation/(id)/motor-engaged#
Whether the motor is engaged.
- Parameters:
id – The identifier of the RoboticRotation object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/robotic-rotation/(id)/is-moving#
Whether the servo is currently moving.
- Parameters:
id – The identifier of the RoboticRotation object.
- Response JSON Object:
value (bool)
- POST /space-center/robotic-rotation/(id)/move-home#
Move rotation servo to its built position.
- Parameters:
id – The identifier of the RoboticRotation object.
Robotic Rotor#
RoboticRotor
A robotic rotor. Obtained by calling GET /space-center/part/(id)/robotic-rotor.
A RoboticRotor object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/robotic-rotor/(id)/part#
The part object for this robotic rotor.
- Parameters:
id – The identifier of the RoboticRotor object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/robotic-rotor/(id)/target-rpm#
Target RPM.
- Parameters:
id – The identifier of the RoboticRotor object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-rotor/(id)/target-rpm#
Target RPM.
- Parameters:
id – The identifier of the RoboticRotor object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-rotor/(id)/current-rpm#
Current RPM.
- Parameters:
id – The identifier of the RoboticRotor object.
- Response JSON Object:
value (float)
- GET /space-center/robotic-rotor/(id)/inverted#
Whether the rotor direction is inverted.
- Parameters:
id – The identifier of the RoboticRotor object.
- Response JSON Object:
value (bool)
- PUT /space-center/robotic-rotor/(id)/inverted#
Whether the rotor direction is inverted.
- Parameters:
id – The identifier of the RoboticRotor object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/robotic-rotor/(id)/torque-limit#
Torque limit percentage.
- Parameters:
id – The identifier of the RoboticRotor object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-rotor/(id)/torque-limit#
Torque limit percentage.
- Parameters:
id – The identifier of the RoboticRotor object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-rotor/(id)/max-torque#
The maximum torque the rotor can generate, in kilonewtons.
- Parameters:
id – The identifier of the RoboticRotor object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-rotor/(id)/max-torque#
The maximum torque the rotor can generate, in kilonewtons.
- Parameters:
id – The identifier of the RoboticRotor object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-rotor/(id)/brake-percentage#
The percentage of braking force applied to the rotor.
- Parameters:
id – The identifier of the RoboticRotor object.
- Response JSON Object:
value (float)
- PUT /space-center/robotic-rotor/(id)/brake-percentage#
The percentage of braking force applied to the rotor.
- Parameters:
id – The identifier of the RoboticRotor object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/robotic-rotor/(id)/locked#
Lock movement.
- Parameters:
id – The identifier of the RoboticRotor object.
- Response JSON Object:
value (bool)
- PUT /space-center/robotic-rotor/(id)/locked#
Lock movement.
- Parameters:
id – The identifier of the RoboticRotor object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/robotic-rotor/(id)/motor-engaged#
Whether the motor is engaged.
- Parameters:
id – The identifier of the RoboticRotor object.
- Response JSON Object:
value (bool)
- PUT /space-center/robotic-rotor/(id)/motor-engaged#
Whether the motor is engaged.
- Parameters:
id – The identifier of the RoboticRotor object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/robotic-rotor/(id)/is-moving#
Whether the rotor is currently moving.
- Parameters:
id – The identifier of the RoboticRotor object.
- Response JSON Object:
value (bool)
RCS#
RCS
An RCS block or thruster. Obtained by calling GET /space-center/part/(id)/rcs.
A RCS object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/rcs/(id)/part#
The part object for this RCS.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/rcs/(id)/active#
Whether the RCS thrusters are active. An RCS thruster is inactive if the RCS action group is disabled (
GET /space-center/control/(id)/rcs), the RCS thruster itself is not enabled (GET /space-center/rcs/(id)/enabled), or it is covered by a fairing (GET /space-center/part/(id)/shielded) and cannot thrust while shielded.- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (bool)
- GET /space-center/rcs/(id)/enabled#
Whether the RCS thrusters are enabled.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (bool)
- PUT /space-center/rcs/(id)/enabled#
Whether the RCS thrusters are enabled.
- Parameters:
id – The identifier of the RCS object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/rcs/(id)/pitch-enabled#
Whether the RCS thruster will fire when pitch control input is given.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (bool)
- PUT /space-center/rcs/(id)/pitch-enabled#
Whether the RCS thruster will fire when pitch control input is given.
- Parameters:
id – The identifier of the RCS object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/rcs/(id)/yaw-enabled#
Whether the RCS thruster will fire when yaw control input is given.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (bool)
- PUT /space-center/rcs/(id)/yaw-enabled#
Whether the RCS thruster will fire when yaw control input is given.
- Parameters:
id – The identifier of the RCS object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/rcs/(id)/roll-enabled#
Whether the RCS thruster will fire when roll control input is given.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (bool)
- PUT /space-center/rcs/(id)/roll-enabled#
Whether the RCS thruster will fire when roll control input is given.
- Parameters:
id – The identifier of the RCS object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/rcs/(id)/forward-enabled#
Whether the RCS thruster will fire when forward control input is given.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (bool)
- PUT /space-center/rcs/(id)/forward-enabled#
Whether the RCS thruster will fire when forward control input is given.
- Parameters:
id – The identifier of the RCS object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/rcs/(id)/up-enabled#
Whether the RCS thruster will fire when up control input is given.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (bool)
- PUT /space-center/rcs/(id)/up-enabled#
Whether the RCS thruster will fire when up control input is given.
- Parameters:
id – The identifier of the RCS object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/rcs/(id)/right-enabled#
Whether the RCS thruster will fire when right control input is given.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (bool)
- PUT /space-center/rcs/(id)/right-enabled#
Whether the RCS thruster will fire when right control input is given.
- Parameters:
id – The identifier of the RCS object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/rcs/(id)/input-override#
Whether the RCS control is being set directly, bypassing the vessel’s normal flight controls. When enabled, the rotation and translation demand is set by
GET /space-center/rcs/(id)/rotation-overrideandGET /space-center/rcs/(id)/translation-overrideinstead of the normal control inputs. The override is automatically released if the controlling client disconnects or the vessel changes. Precision mode leaves an overridden block at full thrust.- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (bool)
- PUT /space-center/rcs/(id)/input-override#
Whether the RCS control is being set directly, bypassing the vessel’s normal flight controls. When enabled, the rotation and translation demand is set by
GET /space-center/rcs/(id)/rotation-overrideandGET /space-center/rcs/(id)/translation-overrideinstead of the normal control inputs. The override is automatically released if the controlling client disconnects or the vessel changes. Precision mode leaves an overridden block at full thrust.- Parameters:
id – The identifier of the RCS object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/rcs/(id)/rotation-override#
The rotation demand applied when
GET /space-center/rcs/(id)/input-overrideis enabled, in the pitch, roll and yaw axes. Each component is a normalized control input between -1 and 1.Note
The block ignores the component for an axis it is disabled for, such as pitch when
GET /space-center/rcs/(id)/pitch-enabledisfalse.- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (tuple<double, double, double>)
- PUT /space-center/rcs/(id)/rotation-override#
The rotation demand applied when
GET /space-center/rcs/(id)/input-overrideis enabled, in the pitch, roll and yaw axes. Each component is a normalized control input between -1 and 1.Note
The block ignores the component for an axis it is disabled for, such as pitch when
GET /space-center/rcs/(id)/pitch-enabledisfalse.- Parameters:
id – The identifier of the RCS object.
- Request JSON Object:
value (tuple<double, double, double>) – The new value.
- GET /space-center/rcs/(id)/translation-override#
The translation demand applied when
GET /space-center/rcs/(id)/input-overrideis enabled, in the right, up and forward axes. Each component is a normalized control input between -1 and 1.Note
The block ignores the component for an axis it is disabled for, such as right when
GET /space-center/rcs/(id)/right-enabledisfalse.- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (tuple<double, double, double>)
- PUT /space-center/rcs/(id)/translation-override#
The translation demand applied when
GET /space-center/rcs/(id)/input-overrideis enabled, in the right, up and forward axes. Each component is a normalized control input between -1 and 1.Note
The block ignores the component for an axis it is disabled for, such as right when
GET /space-center/rcs/(id)/right-enabledisfalse.- Parameters:
id – The identifier of the RCS object.
- Request JSON Object:
value (tuple<double, double, double>) – The new value.
- GET /space-center/rcs/(id)/available-torque#
The available torque, in \(\mathrm{N \cdot m}\), that can be produced by this RCS, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the
GET /space-center/vessel/(id)/reference-frame. Returns zero if RCS is disable.Note
Precision mode weakens the block, and the available torque follows it. A block driven by
GET /space-center/rcs/(id)/input-overrideis exempt, soPOST /space-center/rcs/(id)/override-wrenchcan report the larger torque an override reaches.- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (SpaceCenter.AxisRange)
- GET /space-center/rcs/(id)/available-force#
The available force, in Newtons, that can be produced by this RCS, in the positive and negative x, y and z axes of the vessel. These axes correspond to the coordinate axes of the
GET /space-center/vessel/(id)/reference-frame. Returns zero if RCS is disabled.Note
Precision mode weakens the block, and the available force follows it. A block driven by
GET /space-center/rcs/(id)/input-overrideis exempt, soPOST /space-center/rcs/(id)/override-wrenchcan report the larger force an override reaches.- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (SpaceCenter.AxisRange)
- GET /space-center/rcs/(id)/force#
The force being applied by the RCS thrusters, in Newtons. The vector is in the vessel’s reference frame (
GET /space-center/vessel/(id)/reference-frame). Returns zero if the RCS is inactive.- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (tuple<double, double, double>)
- GET /space-center/rcs/(id)/torque#
The torque being applied by the RCS thrusters about the vessel’s center of mass, in \(\mathrm{N \cdot m}\). The vector is in the vessel’s reference frame (
GET /space-center/vessel/(id)/reference-frame). Returns zero if the RCS is inactive.- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (tuple<double, double, double>)
- POST /space-center/rcs/(id)/override-wrench#
The force and torque the given demands would produce, in Newtons and \(\mathrm{N \cdot m}\).
Note
The demands do not have to be applied. The prediction leaves out full thrust, which
GET /space-center/rcs/(id)/forceandGET /space-center/rcs/(id)/torqueinclude.- Parameters:
id – The identifier of the RCS object.
- Request JSON Object:
rotation (tuple<double, double, double>) – A rotation demand, as set by
GET /space-center/rcs/(id)/rotation-override.translation (tuple<double, double, double>) – A translation demand, as set by
GET /space-center/rcs/(id)/translation-override.
- Response JSON Object:
value (SpaceCenter.Wrench) – The force, and the torque about the vessel’s center of mass, in the vessel’s reference frame (
GET /space-center/vessel/(id)/reference-frame), or zero if the RCS is inactive.
- GET /space-center/rcs/(id)/available-thrust#
The amount of thrust, in Newtons, that would be produced by the thruster when activated. Returns zero if the thruster does not have any fuel. Takes the thrusters current
GET /space-center/rcs/(id)/thrust-limitand atmospheric conditions into account.- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (float)
- GET /space-center/rcs/(id)/max-thrust#
The maximum amount of thrust that can be produced by the RCS thrusters when active, in Newtons, with the
GET /space-center/rcs/(id)/thrust-limitset to 100%. Takes atmospheric conditions into account.- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (float)
- GET /space-center/rcs/(id)/max-vacuum-thrust#
The maximum amount of thrust that can be produced by the RCS thrusters when active in a vacuum, in Newtons.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (float)
- GET /space-center/rcs/(id)/thrust-limit#
The thrust limiter of the thruster. A value between 0 and 1.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (float)
- PUT /space-center/rcs/(id)/thrust-limit#
The thrust limiter of the thruster. A value between 0 and 1.
- Parameters:
id – The identifier of the RCS object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/rcs/(id)/thrusters#
A list of thrusters, one of each nozzel in the RCS part.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (list<SpaceCenter.Thruster>)
- GET /space-center/rcs/(id)/specific-impulse#
The current specific impulse of the RCS, in seconds. Returns zero if the RCS is not active.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (float)
- GET /space-center/rcs/(id)/vacuum-specific-impulse#
The vacuum specific impulse of the RCS, in seconds.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (float)
- GET /space-center/rcs/(id)/kerbin-sea-level-specific-impulse#
The specific impulse of the RCS at sea level on Kerbin, in seconds.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (float)
- GET /space-center/rcs/(id)/propellants#
The names of resources that the RCS consumes.
- Parameters:
id – The identifier of the RCS object.
- Response JSON Object:
value (list<string>)
Sensor#
Sensor
A sensor, such as a thermometer. Obtained by calling GET /space-center/part/(id)/sensor.
A Sensor object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/sensor/(id)/part#
The part object for this sensor.
- Parameters:
id – The identifier of the Sensor object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/sensor/(id)/active#
Whether the sensor is active.
- Parameters:
id – The identifier of the Sensor object.
- Response JSON Object:
value (bool)
- PUT /space-center/sensor/(id)/active#
Whether the sensor is active.
- Parameters:
id – The identifier of the Sensor object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/sensor/(id)/value#
The current value of the sensor.
Note
This is the same readout string shown in the part’s right-click menu in-game, and is intended for display rather than for parsing. Both its units and the way it formats numbers follow the language the game is running in, so it is not stable across locales. For programmatic access to the underlying quantities, use
GET /space-center/part/(id)/temperature(temperature sensors),GET /space-center/flight/(id)/g-force(accelerometers) orGET /space-center/flight/(id)/static-pressure(barometers).- Parameters:
id – The identifier of the Sensor object.
- Response JSON Object:
value (string)
Solar Panel#
SolarPanel
A solar panel. Obtained by calling GET /space-center/part/(id)/solar-panel.
Note
Includes the curved solar panels of Near Future Solar.
A SolarPanel object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/solar-panel/(id)/part#
The part object for this solar panel.
- Parameters:
id – The identifier of the SolarPanel object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/solar-panel/(id)/deployable#
Whether the solar panel is deployable.
- Parameters:
id – The identifier of the SolarPanel object.
- Response JSON Object:
value (bool)
- GET /space-center/solar-panel/(id)/deployed#
Whether the solar panel is extended.
- Parameters:
id – The identifier of the SolarPanel object.
- Response JSON Object:
value (bool)
- PUT /space-center/solar-panel/(id)/deployed#
Whether the solar panel is extended.
- Parameters:
id – The identifier of the SolarPanel object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/solar-panel/(id)/state#
The current state of the solar panel.
- Parameters:
id – The identifier of the SolarPanel object.
- Response JSON Object:
value (SpaceCenter.DeployableState)
- GET /space-center/solar-panel/(id)/energy-flow#
The current amount of energy being generated by the solar panel, in units of charge per second.
- Parameters:
id – The identifier of the SolarPanel object.
- Response JSON Object:
value (float)
- GET /space-center/solar-panel/(id)/sun-exposure#
The current amount of sunlight that is incident on the solar panel, as a percentage. A value between 0 and 1.
- Parameters:
id – The identifier of the SolarPanel object.
- Response JSON Object:
value (float)
Thruster#
Thruster
The component of an Engine or RCS part that generates thrust.
Can obtained by calling GET /space-center/engine/(id)/thrusters or GET /space-center/rcs/(id)/thrusters.
Note
Engines can consist of multiple thrusters. For example, the S3 KS-25x4 “Mammoth” has four rocket nozzels, and so consists of four thrusters.
A Thruster object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/thruster/(id)/part#
The
GET /space-center/thruster/(id)/partthat contains this thruster.- Parameters:
id – The identifier of the Thruster object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/thruster/(id)/thrust#
The thrust being produced by the thruster, in Newtons.
- Parameters:
id – The identifier of the Thruster object.
- Response JSON Object:
value (float)
- POST /space-center/thruster/(id)/thrust-position#
The position at which the thruster generates thrust, in the given reference frame. For gimballed engines, this takes into account the current rotation of the gimbal.
- Parameters:
id – The identifier of the Thruster object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned position vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – The position as a vector.
- POST /space-center/thruster/(id)/thrust-direction#
The direction of the force generated by the thruster, in the given reference frame. This is opposite to the direction in which the thruster expels propellant. For gimballed engines, this takes into account the current rotation of the gimbal.
- Parameters:
id – The identifier of the Thruster object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned direction is in.
- Response JSON Object:
value (tuple<double, double, double>) – The direction as a unit vector.
- GET /space-center/thruster/(id)/thrust-reference-frame#
A reference frame that is fixed relative to the thruster and orientated with its thrust direction (
POST /space-center/thruster/(id)/thrust-direction). For gimballed engines, this takes into account the current rotation of the gimbal.The origin is at the position of thrust for this thruster (
POST /space-center/thruster/(id)/thrust-position).The axes rotate with the thrust direction. This is the direction in which the thruster expels propellant, including any gimballing.
The y-axis points along the thrust direction.
The x-axis and z-axis are perpendicular to the thrust direction.
- Parameters:
id – The identifier of the Thruster object.
- Response JSON Object:
value (SpaceCenter.ReferenceFrame)
- GET /space-center/thruster/(id)/gimballed#
Whether the thruster is gimballed.
- Parameters:
id – The identifier of the Thruster object.
- Response JSON Object:
value (bool)
- POST /space-center/thruster/(id)/gimbal-position#
Position around which the gimbal pivots.
- Parameters:
id – The identifier of the Thruster object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned position vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – The position as a vector.
- GET /space-center/thruster/(id)/gimbal-angle#
The current gimbal angle in the pitch, roll and yaw axes, in degrees.
- Parameters:
id – The identifier of the Thruster object.
- Response JSON Object:
value (tuple<double, double, double>)
- POST /space-center/thruster/(id)/initial-thrust-position#
The position at which the thruster generates thrust, when the engine is in its initial position (no gimballing), in the given reference frame.
Note
This position can move when the gimbal rotates. This is because the thrust position and gimbal position are not necessarily the same.
- Parameters:
id – The identifier of the Thruster object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned position vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – The position as a vector.
- POST /space-center/thruster/(id)/initial-thrust-direction#
The direction of the force generated by the thruster, when the engine is in its initial position (no gimballing), in the given reference frame. This is opposite to the direction in which the thruster expels propellant.
- Parameters:
id – The identifier of the Thruster object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned direction is in.
- Response JSON Object:
value (tuple<double, double, double>) – The direction as a unit vector.
Wheel#
Wheel
A wheel. Includes landing gear and rover wheels.
Obtained by calling GET /space-center/part/(id)/wheel.
Can be used to control the motors, steering and deployment of wheels, among other things.
A Wheel object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/wheel/(id)/part#
The part object for this wheel.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (SpaceCenter.Part)
- GET /space-center/wheel/(id)/state#
The current state of the wheel.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (SpaceCenter.DeployableState)
- GET /space-center/wheel/(id)/radius#
Radius of the wheel, in meters.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- GET /space-center/wheel/(id)/grounded#
Whether the wheel is touching the ground.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- GET /space-center/wheel/(id)/has-brakes#
Whether the wheel has brakes.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- GET /space-center/wheel/(id)/brakes#
The braking force, as a percentage of maximum, when the brakes are applied.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- PUT /space-center/wheel/(id)/brakes#
The braking force, as a percentage of maximum, when the brakes are applied.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/wheel/(id)/auto-friction-control#
Whether automatic friction control is enabled.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- PUT /space-center/wheel/(id)/auto-friction-control#
Whether automatic friction control is enabled.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/wheel/(id)/manual-friction-control#
Manual friction control value. Only has an effect if automatic friction control is disabled. A value between 0 and 5 inclusive.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- PUT /space-center/wheel/(id)/manual-friction-control#
Manual friction control value. Only has an effect if automatic friction control is disabled. A value between 0 and 5 inclusive.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/wheel/(id)/deployable#
Whether the wheel is deployable.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- GET /space-center/wheel/(id)/deployed#
Whether the wheel is deployed.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- PUT /space-center/wheel/(id)/deployed#
Whether the wheel is deployed.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/wheel/(id)/powered#
Whether the wheel is powered by a motor.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- GET /space-center/wheel/(id)/motor-enabled#
Whether the motor is enabled.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- PUT /space-center/wheel/(id)/motor-enabled#
Whether the motor is enabled.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/wheel/(id)/motor-inverted#
Whether the direction of the motor is inverted.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- PUT /space-center/wheel/(id)/motor-inverted#
Whether the direction of the motor is inverted.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/wheel/(id)/motor-state#
Whether the direction of the motor is inverted.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (SpaceCenter.MotorState)
- GET /space-center/wheel/(id)/motor-output#
The output of the motor. This is the torque currently being generated, in \(\mathrm{N \cdot m}\).
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- GET /space-center/wheel/(id)/traction-control-enabled#
Whether automatic traction control is enabled. A wheel only has traction control if it is powered.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- PUT /space-center/wheel/(id)/traction-control-enabled#
Whether automatic traction control is enabled. A wheel only has traction control if it is powered.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/wheel/(id)/traction-control#
Setting for the traction control. Only takes effect if the wheel has automatic traction control enabled. A value between 0 and 5 inclusive.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- PUT /space-center/wheel/(id)/traction-control#
Setting for the traction control. Only takes effect if the wheel has automatic traction control enabled. A value between 0 and 5 inclusive.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/wheel/(id)/drive-limiter#
Manual setting for the motor limiter. Only takes effect if the wheel has automatic traction control disabled. A value between 0 and 100 inclusive.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- PUT /space-center/wheel/(id)/drive-limiter#
Manual setting for the motor limiter. Only takes effect if the wheel has automatic traction control disabled. A value between 0 and 100 inclusive.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/wheel/(id)/steerable#
Whether the wheel has steering.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- GET /space-center/wheel/(id)/steering-enabled#
Whether the wheel steering is enabled.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- PUT /space-center/wheel/(id)/steering-enabled#
Whether the wheel steering is enabled.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/wheel/(id)/steering-inverted#
Whether the wheel steering is inverted.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- PUT /space-center/wheel/(id)/steering-inverted#
Whether the wheel steering is inverted.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/wheel/(id)/steering-angle-auto#
Whether the steering angle is automatically limited based on the vessel’s speed, reducing the maximum angle as the vessel moves faster. See also
GET /space-center/wheel/(id)/steering-angle-limit.- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- PUT /space-center/wheel/(id)/steering-angle-auto#
Whether the steering angle is automatically limited based on the vessel’s speed, reducing the maximum angle as the vessel moves faster. See also
GET /space-center/wheel/(id)/steering-angle-limit.- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (bool) – The new value.
- GET /space-center/wheel/(id)/steering-angle-limit#
The steering angle limit.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- PUT /space-center/wheel/(id)/steering-angle-limit#
The steering angle limit.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/wheel/(id)/steering-response-time#
Steering response time.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- PUT /space-center/wheel/(id)/steering-response-time#
Steering response time.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
value (float) – The new value.
- GET /space-center/wheel/(id)/has-suspension#
Whether the wheel has suspension.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- GET /space-center/wheel/(id)/suspension-spring-strength#
Suspension spring strength, as set in the editor.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- GET /space-center/wheel/(id)/suspension-damper-strength#
Suspension damper strength, as set in the editor.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- GET /space-center/wheel/(id)/suspension-spring#
The spring constant of the suspension, in \(\mathrm{kN/m}\), or
nullwhile the wheel is not grounded. Throws an exception if the wheel has no suspension.Note
The game updates it while the wheel is grounded, from
GET /space-center/wheel/(id)/suspension-spring-strength, the vessel’s mass, the wheel’s compression and the local gravity.- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float?)
- GET /space-center/wheel/(id)/suspension-damper#
The damping constant of the suspension, in \(\mathrm{kN \cdot s/m}\), or
nullwhile the wheel is not grounded. Throws an exception if the wheel has no suspension.Note
The game updates it while the wheel is grounded, from
GET /space-center/wheel/(id)/suspension-damper-strengthandGET /space-center/wheel/(id)/suspension-spring.- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float?)
- GET /space-center/wheel/(id)/suspension-travel#
The travel of the suspension, in meters.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- GET /space-center/wheel/(id)/load#
The force pressing the wheel into the ground, in \(\mathrm{kN}\).
Note
The game raises the load of a grounded wheel to at least 0.5 kN, or 10 kN for a wheel with the old friction model.
GET /space-center/wheel/(id)/impact-toleranceapplies to the rise in this value.- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- POST /space-center/wheel/(id)/contact-position#
The position of the bottom of the wheel, in the given reference frame. While the wheel is grounded, this is where it touches the ground.
- Parameters:
id – The identifier of the Wheel object.
- Request JSON Object:
reference_frame (SpaceCenter.ReferenceFrame) – The reference frame that the returned position vector is in.
- Response JSON Object:
value (tuple<double, double, double>) – The position as a vector.
- GET /space-center/wheel/(id)/broken#
Whether the wheel is broken.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- GET /space-center/wheel/(id)/repairable#
Whether the wheel is repairable.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (bool)
- GET /space-center/wheel/(id)/stress#
Current stress on the wheel.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- GET /space-center/wheel/(id)/stress-tolerance#
Stress tolerance of the wheel.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- GET /space-center/wheel/(id)/impact-tolerance#
The rise in
GET /space-center/wheel/(id)/loadover one physics tick that breaks the wheel, in \(\mathrm{kN}\). Throws an exception if the wheel is not breakable.Note
The game scales the rise by the local gravity divided by standard gravity before comparing it with this tolerance.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- GET /space-center/wheel/(id)/explode-multiplier#
The multiple of
GET /space-center/wheel/(id)/impact-tolerancethat destroys the wheel, in place of breaking it. Throws an exception if the wheel is not breakable.- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- GET /space-center/wheel/(id)/stress-percentage#
Current stress on the wheel as a percentage of its stress tolerance.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- GET /space-center/wheel/(id)/deflection#
Current deflection of the wheel.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
- GET /space-center/wheel/(id)/slip#
Current slip of the wheel.
- Parameters:
id – The identifier of the Wheel object.
- Response JSON Object:
value (float)
MotorState
The state of the motor on a powered wheel. See GET /space-center/wheel/(id)/motor-state.
Passed and returned as the name of one of its values:
"idle"The motor is idle.
"running"The motor is running.
"disabled"The motor is disabled.
"inoperable"The motor is inoperable.
"not_enough_resources"The motor does not have enough resources to run.