Waypoints#

WaypointManager

Waypoints are the location markers you can see on the map view showing you where contracts are targeted for. With this structure, you can obtain coordinate data for the locations of these waypoints. Obtained by calling GET /space-center/waypoint-manager.

A WaypointManager object is passed and returned as its identifier, a number. A path that acts on an object takes it as (id).

GET /space-center/waypoint-manager/(id)/waypoints#

A list of all existing waypoints.

Parameters:
Response JSON Object:
  • value (list<SpaceCenter.Waypoint>)

POST /space-center/waypoint-manager/(id)/add-waypoint#

Creates a waypoint at the given position at ground level, and returns a Waypoint object that can be used to modify it.

Parameters:
Request JSON Object:
  • latitude (double) – Latitude of the waypoint.

  • longitude (double) – Longitude of the waypoint.

  • body (SpaceCenter.CelestialBody) – Celestial body the waypoint is attached to.

  • name (string) – Name of the waypoint.

Response JSON Object:
  • value (SpaceCenter.Waypoint)

POST /space-center/waypoint-manager/(id)/add-waypoint-at-altitude#

Creates a waypoint at the given position and altitude, and returns a Waypoint object that can be used to modify it.

Parameters:
Request JSON Object:
  • latitude (double) – Latitude of the waypoint.

  • longitude (double) – Longitude of the waypoint.

  • altitude (double) – Altitude (above sea level) of the waypoint.

  • body (SpaceCenter.CelestialBody) – Celestial body the waypoint is attached to.

  • name (string) – Name of the waypoint.

Response JSON Object:
  • value (SpaceCenter.Waypoint)

GET /space-center/waypoint-manager/(id)/colors#

An example map of known color - seed pairs. Any other integers may be used as seed.

Parameters:
Response JSON Object:
  • value (dictionary<string, int32>)

GET /space-center/waypoint-manager/(id)/icons#

Returns all available icons (from “GameData/Squad/Contracts/Icons/”).

Parameters:
Response JSON Object:
  • value (list<string>)

Waypoint

Represents a waypoint. Can be created using POST /space-center/waypoint-manager/(id)/add-waypoint.

A Waypoint object is passed and returned as its identifier, a number. A path that acts on an object takes it as (id).

GET /space-center/waypoint/(id)/body#

The celestial body the waypoint is attached to.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (SpaceCenter.CelestialBody)

PUT /space-center/waypoint/(id)/body#

The celestial body the waypoint is attached to.

Parameters:
  • id – The identifier of the Waypoint object.

Request JSON Object:
  • value (SpaceCenter.CelestialBody) – The new value.

GET /space-center/waypoint/(id)/name#

The name of the waypoint as it appears on the map and the contract.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (string)

PUT /space-center/waypoint/(id)/name#

The name of the waypoint as it appears on the map and the contract.

Parameters:
  • id – The identifier of the Waypoint object.

Request JSON Object:
  • value (string) – The new value.

GET /space-center/waypoint/(id)/color#

The seed of the icon color. See GET /space-center/waypoint-manager/(id)/colors for example colors.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (int32)

PUT /space-center/waypoint/(id)/color#

The seed of the icon color. See GET /space-center/waypoint-manager/(id)/colors for example colors.

Parameters:
  • id – The identifier of the Waypoint object.

Request JSON Object:
  • value (int32) – The new value.

GET /space-center/waypoint/(id)/icon#

The icon of the waypoint.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (string)

PUT /space-center/waypoint/(id)/icon#

The icon of the waypoint.

Parameters:
  • id – The identifier of the Waypoint object.

Request JSON Object:
  • value (string) – The new value.

GET /space-center/waypoint/(id)/latitude#

The latitude of the waypoint.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (double)

PUT /space-center/waypoint/(id)/latitude#

The latitude of the waypoint.

Parameters:
  • id – The identifier of the Waypoint object.

Request JSON Object:
  • value (double) – The new value.

GET /space-center/waypoint/(id)/longitude#

The longitude of the waypoint.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (double)

PUT /space-center/waypoint/(id)/longitude#

The longitude of the waypoint.

Parameters:
  • id – The identifier of the Waypoint object.

Request JSON Object:
  • value (double) – The new value.

GET /space-center/waypoint/(id)/mean-altitude#

The altitude of the waypoint above sea level, in meters.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (double)

PUT /space-center/waypoint/(id)/mean-altitude#

The altitude of the waypoint above sea level, in meters.

Parameters:
  • id – The identifier of the Waypoint object.

Request JSON Object:
  • value (double) – The new value.

GET /space-center/waypoint/(id)/surface-altitude#

The altitude of the waypoint above the surface of the body or sea level, whichever is closer, in meters.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (double)

PUT /space-center/waypoint/(id)/surface-altitude#

The altitude of the waypoint above the surface of the body or sea level, whichever is closer, in meters.

Parameters:
  • id – The identifier of the Waypoint object.

Request JSON Object:
  • value (double) – The new value.

GET /space-center/waypoint/(id)/bedrock-altitude#

The altitude of the waypoint above the surface of the body, in meters. When over water, this is the altitude above the sea floor.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (double)

PUT /space-center/waypoint/(id)/bedrock-altitude#

The altitude of the waypoint above the surface of the body, in meters. When over water, this is the altitude above the sea floor.

Parameters:
  • id – The identifier of the Waypoint object.

Request JSON Object:
  • value (double) – The new value.

GET /space-center/waypoint/(id)/near-surface#

true if the waypoint is near to the surface of a body.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (bool)

GET /space-center/waypoint/(id)/grounded#

true if the waypoint is attached to the ground.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (bool)

GET /space-center/waypoint/(id)/index#

The integer index of this waypoint within its cluster of sibling waypoints. In other words, when you have a cluster of waypoints called “Somewhere Alpha”, “Somewhere Beta” and “Somewhere Gamma”, the alpha site has index 0, the beta site has index 1 and the gamma site has index 2. When GET /space-center/waypoint/(id)/clustered is false, this is zero.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (int32)

GET /space-center/waypoint/(id)/clustered#

true if this waypoint is part of a set of clustered waypoints with greek letter names appended (Alpha, Beta, Gamma, etc). If true, there is a one-to-one correspondence with the greek letter name and the GET /space-center/waypoint/(id)/index.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (bool)

GET /space-center/waypoint/(id)/has-contract#

Whether the waypoint belongs to a contract.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (bool)

GET /space-center/waypoint/(id)/contract#

The associated contract.

Parameters:
  • id – The identifier of the Waypoint object.

Response JSON Object:
  • value (SpaceCenter.Contract)

POST /space-center/waypoint/(id)/remove#

Removes the waypoint.

Note

Any further use of this object throws an exception.

Parameters:
  • id – The identifier of the Waypoint object.