GET environment

A lookup call to get all available environments, including their ID and description. The call will allow a single ID to be given in order to return the description. If no ID is supplied, all environments are returned.

When accessed via a GET request this API method will return a list of all environments. Included in the response will be a list of required and optional attributes for the environment. This data can be used as the basis for generating the attribute listing when creating or updating frames.

INPUT

As this method is accessed via a GET request there is no HTTP body so options can be specified via the URL.

parameter type description
id string (optional) a environment code to restrict results to

OUTPUT - JSON sample

If accessing GET /api/environment?id=AirportEnclosed the following JSON would be returned:


{
    "data": [
        {
            "environment_code": "AirportEnclosed",
            "route_environment_description": "Airport enclosed - 15",
            "on_route": 1,
            "space_environment_description": "Airport Enclosed",
            "attributes": {
                "required": [
                    "Address",
                    "FramePositionID",
                    "MapID",
                    "PostCode",
                    "WorldGeodeticCoordinate"
                ],
                "optional": [
                    "BreakLength",
                    "MGEIndoorCoordinate",
                    "ShareOfTime",
                    "SpotLength"
                ]
            }
        }
    ]
}
        

A "data" element that contains an array of environments defined as follows:

environment_code - string - the unique identifier used within SPACE to reference the environment

route_environment_description - string - a description of the environment suitable for display to a user

on_route - int - whether the frame is to be submitted to Route or not, by 1 or 0 respectively

space_environment_description - string - SPACE description of the environment suitable for display to a user

attributes - array - an array containing required and optional keys

  • required - array - an array of strings listing required attributes for this environment
  • optional - array - an array of strings listing optional attributes for this environment